<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>localhost.pbcopy</string>
This file contains hidden or 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
| net.core.wmem_max = 12582912 | |
| net.core.rmem_max = 12582912 | |
| net.ipv4.tcp_rmem = 10240 87380 12582912 | |
| net.ipv4.tcp_wmem = 10240 87380 12582912 | |
| net.ipv4.ip_local_port_range = 18000 65535 | |
| net.ipv4.netfilter.ip_conntrack_tcp_timeout_time_wait = 1 | |
| net.ipv4.tcp_window_scaling = 1 | |
| net.ipv4.tcp_max_syn_backlog = 3240000 | |
| net.core.somaxconn = 3240000 | |
| net.ipv4.tcp_max_tw_buckets = 1440000 |
This file contains hidden or 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/bash | |
| IP="/bin/ip" | |
| function prepare_rt_table() { | |
| local rttables=/etc/iproute2/rt_tables | |
| local iface=$1 | |
| [[ "${iface}" = 'lo' ]] && return | |
| if ! egrep -q "\s${iface}\s*"\$ $rttables; then | |
| idx=$(wc -l <$rttables) |
This file contains hidden or 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
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains hidden or 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
| import eyed3 | |
| import re | |
| import glob | |
| def get_lyric(lrc): | |
| text = open(lrc).read() | |
| text = re.sub(r'(?:\[.*\])+', '', text).strip() | |
| text = map(lambda l: l.strip(), text.split('\n')) | |
| ans = [] | |
| for l in text: |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Consumer key: IQKbtAYlXLripLGPWd0HUA
Consumer secret: GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU
Consumer key: 3nVuSoBZnx6U4vzUxf5w
Consumer secret: Bcs59EFbbsdF6Sl9Ng71smgStWEGwXXKSjYvPVt7qys
Consumer key: CjulERsDeqhhjSme66ECg
This file contains hidden or 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
| /* | |
| * Partial applied functions in C | |
| * Leandro Pereira <leandro@tia.mat.br> | |
| */ | |
| #include <assert.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <stdint.h> | |
| #include <stdbool.h> |
This file contains hidden or 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
| ; source: http://okmij.org/ftp/Scheme/sokuza-kanren.scm | |
| ; Quick miniKanren-like code | |
| ; | |
| ; written at the meeting of a Functional Programming Group | |
| ; (Toukyou/Shibuya, Apr 29, 2006), as a quick illustration of logic | |
| ; programming. The code is really quite trivial and unsophisticated: | |
| ; it was written without any preparation whatsoever. The present file | |
| ; adds comments and makes minor adjustments. |
This file contains hidden or 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
| $stack, $draws = [], {} | |
| def method_missing *args | |
| return if args[0][/^to_/] | |
| $stack << args.map { |a| a or $stack.pop } | |
| $draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
| end | |
| class Array | |
| def +@ |