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
package Async; | |
use warnings; | |
use strict; | |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); | |
@ISA = qw(Exporter); | |
@EXPORT_OK = qw(waterfall); | |
# waterfall: executes mutliple subroutines in series, passing result from previous run to the next. |
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
<?xml version="1.0"?> | |
<root> | |
<item> | |
<identifier>private.button_4_next_space</identifier> | |
<name>Mouse buttons to move spaces</name> | |
<appendix>Mouse button 4 to next space</appendix> | |
<autogen> | |
__KeyToKey__ | |
PointingButton::BUTTON4, | |
KeyCode::CURSOR_RIGHT, ModifierFlag::COMMAND_L | ModifierFlag::CONTROL_L |
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
#!/opt/perl/bin/perl | |
use strict; | |
use warnings; | |
use Benchmark; | |
# Perl version 5.010001 | |
# Rate 10^4 keys 10^3 keys 10^5 keys 10^1 keys 10^2 keys | |
# 10^4 keys 2429401/s -- -0% -1% -2% -2% |
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 | |
use strict; | |
use warnings; | |
use Benchmark; | |
print "Perl version $]\n"; | |
my %subs; |
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 -e | |
# usage: ./tcp-proxy.sh 8080 tweakers.net 80 | |
# script written by | |
# https://notes.tweakblogs.net/blog/7955/using-netcat-to-build-a-simple-tcp-proxy-in-linux.html | |
if [ $# != 3 ] | |
then | |
echo "usage: $0 <src-port> <dst-host> <dst-port>" | |
exit 0 |
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 perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use Term::ANSIColor; | |
# usage: | |
# |
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
var http = require('http'); | |
var jsonResp = { | |
"type": "free" | |
}; | |
var jsonRespPaid = { | |
"type": "Paid" | |
} | |
var port = process.argv[2]; |
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
# use git clone to clone the go repo to the right location in your gopath | |
function goget() { | |
# github.com/foo/bar | |
GIT_PATH="$@" | |
# [email protected]:foo/bar.git | |
GIT_CLONE_PATH=`echo "$GIT_PATH" | perl -lape 's!(.+?)/!git\@$1:!'` | |
mkdir -p "$GOPATH/src/$GIT_PATH" && git clone "$GIT_CLONE_PATH" "$GOPATH/src/$GIT_PATH" | |
} |
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
package main | |
import "fmt" | |
const MaxUint = ^uint(0) | |
const MinUint = 0 | |
const MaxInt = int(MaxUint >> 1) | |
const MinInt = -MaxInt - 1 | |
func main() { |
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
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886158" | |
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886162" | |
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886163" | |
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886179" | |
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886184" | |
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886205" | |
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886207" | |
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886208" | |
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886209" | |
curl -s -X GET "apidendpointp1mdw1.sendgrid.net:8082/api/swimlane/user/delete.json?userid=1886211" |
NewerOlder