Skip to content

Instantly share code, notes, and snippets.

View mowshon's full-sized avatar
😍
throw an exception

V. B. mowshon

😍
throw an exception
View GitHub Profile
@Integralist
Integralist / Python TCP Client Example.py
Created September 18, 2016 15:07
Python TCP Client Server Example
import socket
hostname, sld, tld, port = 'www', 'integralist', 'co.uk', 80
target = '{}.{}.{}'.format(hostname, sld, tld)
# create an ipv4 (AF_INET) socket object using the tcp protocol (SOCK_STREAM)
client = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
# connect the client
# client.connect((target, port))
@andreiglingeanu
andreiglingeanu / unyson-start-testing.sh
Created May 24, 2016 14:34
Install fresh wordpress wth unyson and it's scratch theme. Requires wp-cli to be installed and available in PATH.
#!/bin/bash
#
# USAGE: unyson-testing wp-test
#
# Some steps may not be required for you. You welcome to fork the gist
# and make it the way you like it.
#
# Install fresh wordpress with unyson
@cbmd
cbmd / default.conf
Created December 9, 2012 21:13
nginx config - dynamic virtual hosts
server {
index index.php;
set $basepath "/var/www";
set $domain $host;
# check one name domain for simple application
if ($domain ~ "^(.[^.]*)\.dev$") {
set $domain $1;
set $rootpath "${domain}";