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
-- Meant to be used as part of Automator service. Create a new service in | |
-- Automator and send files or folders to this AppleScript. Supports multiple files. | |
on run {input, parameters} | |
tell application "Finder" | |
activate | |
try | |
set this_folder to (the target of the front window) as alias | |
on error | |
set this_folder to home folder |
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
clear Lock | |
clear mod1 | |
clear mod4 | |
keycode 66 = Escape | |
keycode 64 = Super_L | |
keycode 108 = Super_R | |
keycode 133 = Alt_L Meta_L | |
keycode 135 = Alt_R Meta_R | |
add mod4 = Super_L Super_R | |
add mod1 = Alt_L Alt_R Meta_L Meta_R |
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
from flask import Flask | |
def configure_uwsgi(app): | |
# Setup debugging, logging for uwsgi. | |
try: | |
import uwsgi | |
except ImportError: | |
return | |
from time import strftime |
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
augroup fastescape | |
au! | |
set notimeout | |
set ttimeout | |
set timeoutlen=10 | |
au InsertEnter * set timeout | |
au InsertLeave * set notimeout | |
augroup END |
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
package main | |
import "fmt" | |
func ping(c chan string) { | |
fmt.Println("starting ping") | |
for { | |
c <- "ping" | |
pong := <-c | |
fmt.Println(pong) |
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
package main | |
import "fmt" | |
func ping(c chan string) { | |
for { | |
c <- "ping" | |
} | |
} |
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
package main | |
import "fmt" | |
// Error | |
type notSquared struct { | |
number int | |
} | |
func (e notSquared) Error() 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
$ ab -k -c 100 -n 10000 http://go.dev:1337/ | |
This is ApacheBench, Version 2.3 <$Revision: 655654 $> | |
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | |
Licensed to The Apache Software Foundation, http://www.apache.org/ | |
Benchmarking localhost (be patient) | |
Completed 1000 requests | |
Completed 2000 requests | |
Completed 3000 requests | |
Completed 4000 requests |
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
#!/usr/bin/env python2.7 | |
""" | |
description | |
hoodoo is a task management app. tasks can be tagged, searched, sorted. | |
commands available | |
add <name> #<tag> add a new task | |
alias: + | |
opt: created=<date> due=<date> done=True/False, tags |
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 requests | |
from requests.adapters import HTTPAdapter | |
from requests.packages.urllib3.connection import HTTPConnection, HTTPSConnection | |
from requests.packages.urllib3.connectionpool import HTTPConnectionPool, HTTPSConnectionPool | |
from requests.packages.urllib3.poolmanager import PoolManager | |
def create_bound_session(source_address): | |
''' | |
Creates a requests session bound to a given source address. Proving once |