Skip to content

Instantly share code, notes, and snippets.

View gist:372111
parted /dev/sda
> mklabel msdos
> mkpart primary ext2 0% 128MB
> mkpart primary linux-swap 128MB 2176MB
> mkpart primary ext2 2176MB 2688MB
> mkpart primary ext3 2688MB 100%
> set 1 boot on
mkfs.ext4 -b 4096 -E "lazy_itable_init=1" -G 128 -i 4096 -I 256 »
-L "Puzzles' Journal" -m "0.5" -M "/" »
@jeffgeiger
jeffgeiger / update_blacklist.sh
Created Oct 15, 2014
Update IPTables with IP's from OpenBL
View update_blacklist.sh
#!/bin/bash
CHAINLIST=$(/sbin/iptables -nL | grep 'Chain block-traffic-from-openbl' | cut -d\ -f 2)
if [ -z $CHAINLIST ]; then
/sbin/iptables -N block-traffic-from-openbl
/sbin/iptables -A INPUT -j block-traffic-from-openbl
fi
BLACKLIST=$(/usr/bin/curl -fs http://www.openbl.org/lists/base_7days.txt.gz | gunzip | egrep "[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}")
@bauer1j
bauer1j / gist:1320355
Created Oct 27, 2011
ECN testing configuration
View gist:1320355
#!/bin/bash
# This script depends upon the conntrack, connmark, connbytes, and the ecn modules of iptables.
# These are installed by default on the Linux boxes we employed, but if your distribution is
# older, you may need to update your kernel and iptables. This script also assumes that the users
# which runs it has the sufficient privileges to run all the commands below.
# Careful, this script flushes the filter and mangle tables.
iptables -t filter -F
iptables -t mangle -F
View Arma3_tcp_optimizing.bat
:: this is dwarden's experimental TCP related batch
@netsh int tcp set global chimney=enabled
@netsh int tcp set global dca=enabled
@netsh int tcp set global ecncapability=enabled
@netsh int tcp set global congestionprovider=ctcp
@netsh int tcp set global timestamps=enabled
@rem netsh int tcp set global autotuninglevel=disabled
@netsh int tcp show global autotuninglevel
:: disabling autotuning needs testing, sometimes help sometimes not
View remove-hackaday-comments.user.js
// ==UserScript==
// @name Remove Hackaday comments
// @namespace http://numin.it
// @version 0.6
// @description remove all potential clues that comments may exist on hackaday.com
// @author numinit
// @match http://hackaday.com/*
// @match https://hackaday.com/*
// @grant none
// ==/UserScript==
View weiboLogin.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import urllib
import urllib2
import cookielib
import base64
import re
import json
@yszou
yszou / sina_sso.py
Created Dec 9, 2013
新浪的SSO授权登录
View sina_sso.py
# -*- coding: utf-8 -*-
import rsa
import re
import time
import json
import traceback
from urllib import urlencode, unquote, quote
from Cookie import SimpleCookie
import tornado
@Harry-Chen
Harry-Chen / book.tex
Last active Nov 23, 2018
XeLaTeX template for short novel (as book)
View book.tex
\documentclass[zihao=-4,oneside,UTF8]{ctexbook}
\usepackage{titlesec,fancyhdr,xltxtra,hyperxmp}
\usepackage[xetex,a4paper,centering,scale=0.8]{geometry}
\input{config.tex}
\xeCJKsetup{CheckSingle}
\pagestyle{fancy}
\setmainfont{\bookmainfont}
@lotem
lotem / luna_pinyin.custom.yaml
Last active May 29, 2021
在【朙月拼音】裏使用Emoji表情(這份配置已過時,新的emoji實現代碼在 https://github.com/rime/rime-emoji
View luna_pinyin.custom.yaml
# luna_pinyin.custom.yaml
#
# 在【朙月拼音】裏使用Emoji表情(這份配置已過時,新的emoji實現代碼在 https://github.com/rime/rime-emoji )
#
# 保存到Rime用戶文件夾後,重新部署生效
# ~/.config/ibus/rime (linux)
# ~/Library/Rime (macos)
# %APPDATA%\Rime (windows)
#
# 如果目標文件已經包含其他修改內容,只需按照縮進合併 patch: 以下的部分
@nickbudi
nickbudi / README.md
Last active Aug 9, 2021
Budi's Counter-Strike: Source config
View README.md

Budi's CS:S Config

This is my constantly updated CS:S autoexec config.

Put the file autoexec.cfg in ...\Steam\steamapps\*steam username*\counter-strike source\cstrike\cfg or take what you want from it and add to your autoexec config!

Launch Options

-novid -noborder -high -threads 4 -freq 144 +exec autoexec.cfg