Skip to content

Instantly share code, notes, and snippets.

View tnlin's full-sized avatar
🎯
Focusing

Tony Lin tnlin

🎯
Focusing
View GitHub Profile
@tnlin
tnlin / yupyupnope.conf
Created March 21, 2017 10:05 — forked from yosemitebandit/yupyupnope.conf
nginx config file for flask app (behind gunicorn) with ssl
server {
listen 80;
server_name www.yupyupnope.com;
rewrite ^/(.*) https://yupyupnope.com/$1 permanent;
}
server {
listen 80;
server_name yupyupnope.com;
rewrite ^/(.*) https://yupyupnope.com/$1 permanent;
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# Forked by rjorgenson - http://github.com/rjorgenson
#
# # README
#
# In order for this theme to render correctly, you will need a
@tnlin
tnlin / iterm2-solarized.md
Created July 23, 2016 04:07 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OS X / macOS)

Solarized

var fs = require('fs'),
http = require('http'),
https = require('https'),
express = require('express'),
token = '',
bodyParser = require('body-parser'),
request = require('request');
var port = 443;
@tnlin
tnlin / gist:8339d4c4122efcab3397
Created March 10, 2016 11:20 — forked from imZack/gist:5554337
鄉民 DDoS 工具 介面漂亮版
<!doctype html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>鍵盤開戰 復刻 PTTATK</title>
<link href="https://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" rel="stylesheet">
</head>
<body>
@tnlin
tnlin / Multi-Threaded_Web_Crawler.py
Created November 3, 2015 03:28 — forked from jwickett/Multi-Threaded_Web_Crawler.py
A multi-threaded Web crawler implemented in Python
import threading, urllib, urlparse
from HTMLParser import HTMLParser
import sys
class LinkHTMLParser(HTMLParser):
A_TAG = "a"
HREF_ATTRIBUTE = "href"
def __init__(self):
self.links = []
setenv LSCOLORS "Exfxcxdxbxegedabagacad"
alias ls 'ls -G'
# -G colorful ls
# LSCOLORS config -G's color
if ($?prompt) then
if(! $?WINDOW ) then
set prompt="%{^[[1;36m%}%T%{^[[m%}%{^[[1;33m%}%n%{^[[m%}@%{^[[1;37m%}%m%{^[[1;32m%}[%~]%{^[[m%}> "
else
set prompt="%{^[[1;36m%}%T%{^[[m%}%{^[[1;33m%}%n%{^[[m%}@%{^[[1;37m%}%m%{^[[1;32m%}[%~]%{^[[m%}%{^[[1;35m%}[W$WINDOW]%{^[[m%}> "
location / {
proxy_set_header HOST $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
root /usr/local/www/apache24/data;
index index.html index.htm;
}