This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# | |
# vi: set filetype=sh : | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
# -*- coding: utf-8 -*- | |
# | |
# Author: Ray Chen <oldsharp@gmail.com> | |
# | |
# This program has been placed in the public domain. | |
"""A puzzle game with moving tiles.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# google public dns | |
8.8.8.8 | |
8.8.4.4 | |
# opendns | |
208.67.222.222 | |
208.67.220.220 | |
# v2ex dns | |
199.91.73.222 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### hostapd configuration file ############################################## | |
interface=wlan0 | |
ctrl_interface=/var/run/hostapd | |
ssid=octocat | |
channel=3 | |
wpa=2 | |
wpa_passphrase=<password> | |
#bridge=br0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
sudo iptables -A FORWARD -o eth0 -i wlan0 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT | |
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
sudo iptables -t nat -F POSTROUTING | |
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os | |
import shutil | |
import ccmlib.cluster | |
CLEAR = True | |
NODE_NUM = 4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def month_pay_calc(base, month_rate, month_count): | |
return (base * month_rate * ((month_rate+1.0)**month_count)) / \ | |
((month_rate+1.0)**month_count - 1.0) | |
base = 124 * 10000 | |
g_base_1 = 80 * 10000 | |
g_base_2 = 30 * 10000 | |
month_count = 12 * 30 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# by entheon, do whatever the hell you want with this file | |
print "\n"; | |
print "**************************\n"; | |
print "*XTERM 256Color Test Chart\n"; | |
print "**************************\n"; | |
print "* 16 = black\n"; | |
print "* 255 = white\n"; |
NewerOlder