Skip to content

Instantly share code, notes, and snippets.

View aowongster's full-sized avatar

Alistair Wong aowongster

View GitHub Profile
@aowongster
aowongster / git-deployment.md
Created April 11, 2018 22:17 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks
View git-deployment.md

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

@aowongster
aowongster / 100.txt
Created July 4, 2017 17:34
The numbers one through one hundred spelled out in english plain text
View 100.txt
one
two
three
four
five
six
seven
eight
nine
ten
@aowongster
aowongster / alexa.js
Last active November 21, 2022 18:08 — forked from chilts/alexa.js
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array. Now with majestic
View alexa.js
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
const alexa = 'http://s3.amazonaws.com/alexa-static/top-1m.csv.zip'
const majestic = 'http://downloads.majesticseo.com/majestic_million.csv'
const sources = [majestic];
const zSources = [alexa];
@aowongster
aowongster / autossh.sh
Created February 15, 2017 19:01
autossh command
View autossh.sh
#!/bin/bash
# create ssh proxy server
# http://www.commandlinefu.com/commands/view/1060/create-an-ssh-socks-proxy-server-on-localhost8000-that-will-re-start-itself-if-something-breaks-the-connection-temporarily
autossh -f -M 20000 -N -D 8000 some_ssh_host
# then setup a socks proxy for your browser to localhost:8000
# to browse securely!
@aowongster
aowongster / post-receive
Created February 9, 2017 19:45
git post receive hook for updating index on push
View post-receive
#!/bin/bash
unset GIT_DIR
echo "checking out force latest"
pwd
cd .. && git checkout -f
@aowongster
aowongster / index.html
Created February 3, 2017 07:36
Blank html doc
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>title</title>
<link rel="stylesheet" href="style.css">
<script src="script.js"></script>
</head>
<body>
<!-- page content -->
@aowongster
aowongster / DCGAN.ipynb
Created January 20, 2017 17:15 — forked from awjuliani/DCGAN.ipynb
An implementation of DCGAN in Tensorflow and Python.
View DCGAN.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aowongster
aowongster / email_notify.py
Last active January 24, 2017 02:31 — forked from jriguera/email_notify.py
Email from Python with Jinja2
View email_notify.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Python 3 and compatibility with Python 2
from __future__ import unicode_literals, print_function
import os
import sys
import re
import logging
@aowongster
aowongster / dnsperf_install.sh
Last active August 30, 2016 00:21 — forked from hanshasselberg/dnsperf_install.sh
Install dnsperf on ubuntu
View dnsperf_install.sh
#!/bin/bash
# shell script to install dnsperf tool on ubuntu
sudo apt-get install -y bind9utils libbind-dev libkrb5-dev libssl-dev libcap-dev libxml2-dev libgeoip-dev
curl ftp://ftp.nominum.com/pub/nominum/dnsperf/2.1.0.0/dnsperf-src-2.1.0.0-1.tar.gz -O
tar xfvz dnsperf-src-2.1.0.0-1.tar.gz
cd dnsperf-src-2.1.0.0-1
./configure
make
@aowongster
aowongster / Sails-1.md
Last active August 29, 2015 14:21
Sails tutorials
View Sails-1.md