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
/*********************************************************************** | |
* connect.c -- Make socket connection using SOCKS4/5 and HTTP tunnel. | |
* | |
* Copyright (c) 2000-2004 Shun-ichi Goto | |
* Copyright (c) 2002, J. Grant (English Corrections) | |
* | |
* This program is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU General Public License | |
* as published by the Free Software Foundation; either version 2 | |
* of the License, or (at your option) any later version. |
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
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
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/bash | |
# ssh-multi | |
# D.Kovalov | |
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
# a script to ssh multiple servers over multiple tmux panes | |
starttmux() { | |
if [ -z "$HOSTS" ]; then |
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/bash | |
DBSTATUS=$(sqlite3 "$1" "PRAGMA integrity_check") | |
if [ "$DBSTATUS" == "ok" ] ; then | |
echo DB ALREADY OK | |
else | |
echo FIXING CORRUPT DB | |
TMPDB=$(mktemp -t sarim) | |
echo ".mode insert | |
.dump" | sqlite3 "$1" > $TMPDB |
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
--- | |
# This has been tested with ansible 1.3 with these commands: | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
# ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
# NB: The type of the variable is crucial! | |
- name: Ansible Conditionals Examples | |
hosts: $hosts | |
vars_files: |
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 | |
# Originally by: Dr. Martin Menzel www.dr-menzel-it.de | |
# Modified by Matthew Pherigo | |
# | |
# Use at your own risk. No warranty. No fee. | |
# | |
# parameter list: | |
# (1) the filesystem to be used to start decendant recursion | |
# example: apool/zones/webzone | |
# (2) the snapshot to which the filesystems should be rolled back |
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
## | |
# WHOIS servers for new TLDs (http://www.iana.org/domains/root/db) | |
# Current as of 2017-12-10 UTC | |
## | |
\.aarp$ whois.nic.aarp | |
\.abarth$ whois.afilias-srs.net | |
\.abbott$ whois.afilias-srs.net | |
\.abbvie$ whois.afilias-srs.net | |
\.abc$ whois.nic.abc |
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
function transfer | |
if test (count $argv) -eq 0 | |
echo "No arguments specified. Usage:\necho transfer /tmp/test.md\ncat /tmp/test.md | transfer test.md" | |
return 1 | |
end | |
## get temporarily filename, output is written to this file show progress can be showed | |
set tmpfile ( mktemp -t transferXXX ) | |
## upload stdin or file |
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 | |
# | |
# Calculates the total number of Science Packs needed for research | |
# in the game Factorio (www.factorio.com). | |
# | |
# Created by Gandalfx | |
# https://gandalfx.github.com | |
sciences = { | |
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/bash | |
# CHANGE THESE | |
auth_email="[email protected]" | |
auth_key="c2547eb745079dac9320b638f5e225cf483cc5cfdda41" # found in cloudflare account settings | |
zone_name="example.com" | |
record_name="www.example.com" | |
# MAYBE CHANGE THESE | |
ip=$(curl -s http://ipv4.icanhazip.com) |
OlderNewer