Skip to content

Instantly share code, notes, and snippets.

@bosky101
bosky101 / var-log-puppet.log
Created February 9, 2016 22:27
install stackstorm on fresh ubuntu failure feb10
Ign http://us-west-2.ec2.archive.ubuntu.com trusty InRelease
Hit http://us-west-2.ec2.archive.ubuntu.com trusty-updates InRelease
Hit http://us-west-2.ec2.archive.ubuntu.com trusty-backports InRelease
Hit http://us-west-2.ec2.archive.ubuntu.com trusty Release.gpg
Hit http://us-west-2.ec2.archive.ubuntu.com trusty Release
Hit http://us-west-2.ec2.archive.ubuntu.com trusty-updates/main Sources
Hit http://us-west-2.ec2.archive.ubuntu.com trusty-updates/restricted Sources
Hit http://us-west-2.ec2.archive.ubuntu.com trusty-updates/universe Sources
Hit http://us-west-2.ec2.archive.ubuntu.com trusty-updates/multiverse Sources
Hit http://us-west-2.ec2.archive.ubuntu.com trusty-updates/main amd64 Packages
@bosky101
bosky101 / keybase.md
Created February 8, 2016 15:57
keybase.md

Keybase proof

I hereby claim:

  • I am bosky101 on github.
  • I am bosky (https://keybase.io/bosky) on keybase.
  • I have a public key whose fingerprint is 9504 A250 5B5E 1473 A839 463C 7DF2 675C 1EC6 7909

To claim this, I am signing this object:

@bosky101
bosky101 / benchmark.sh
Last active August 29, 2015 13:58 — forked from emersonmoretto/benchmark.sh
benchmark a bunch of urls with POST and plot them in the same graph as points
#!/bin/bash
echo -e "\nbenchmark.sh <title> -n<number of requests> -c<number of concurrency> <URL1> <URL2> ..."
echo -e "\nEx: benchmark.sh example -n100 -c10 http://www.google.com/ http://www.bing.com/ will create benchmar-example-n100-c10.png\n"
## Gnuplot settings
echo "set terminal png
set output 'benchmark-${1}${2}${3}.png'
set title 'Benchmark: ${1} with ab ${2} ${3}'
@bosky101
bosky101 / stress-docker-run
Last active December 25, 2015 21:19
stress testing the creation of a 1000 docker containers, comes across file descriptor and iptable errors
[] ubuntu@~$ sudo docker version
Client version: 0.6.3
Go version (client): go1.1.2
Git commit (client): b0a49a3
Server version: 0.6.3
Git commit (server): b0a49a3
Go version (server): go1.1.2
Last stable version: 0.6.4, please update docker
[] ubuntu@~$ ulimit -a
@bosky101
bosky101 / jswarrior
Created September 26, 2013 07:14
jswarrior level5 crossed, with this . more at http://jswarrior.fusioncharts.com
jsWarrior.turn = function(warrior) {
if(warrior.check() == "enemy") {
warrior.enemies=(warrior.enemies)?warrior.enemies+1:1;
if(!warrior.fighting){warrior.fighting++;}else{ warrior.tired++;}
warrior.attack();
}
else {
if(warrior.check() == "diamond") {
warrior.collect();
}else{
@bosky101
bosky101 / gist:6625584
Created September 19, 2013 15:56
eg of pushing to a private docker repo
$ docker ps
ID IMAGE COMMAND CREATED STATUS PORTS
2dd6ee092e87 verbs/statsdwithl:latest node /statsd-0.6.0/s 3 weeks ago Up 3 weeks XXX->8125/udp, XXX->8126
e71f9a45e648 lonewolf/graphite:latest /bin/sh /usr/local/b 3 weeks ago Ghost XXX->2003, XXX->8000
$ docker commit 2dd6ee092e87 verbsbackup/statsd
7ff742b1ec9e
$ docker images
REPOSITORY TAG ID CREATED SIZE
@bosky101
bosky101 / customersalsobought-bookmark.txt
Last active December 19, 2015 15:09
Reached an iTunes page and want to know where iTunes recommends it to users? Create a new bookmark on your browser toolbar, with the location as follows.
javascript:(function(){ var meta=document.getElementsByTagName('meta')[1].getAttribute('content').split(','); var q = '"Customers also bought." '+meta[0] +' ·' + meta[2] + '; "View in iTunes." site:itunes.apple.com inurl:"/us/"'; window.location.href = 'https://google.com/search?q='+encodeURIComponent(q);})();
@bosky101
bosky101 / test_ssl.erl
Last active December 18, 2015 20:59
Testing a simple https get request. R16A, R16B,R16B01 seems to fail, while for the same configuration R15B03 works. Change USE_VERIFY_PEER, ?USE_SSL_TIMEOUT, and location of ?home, ?CERT,?KEY,?CA accordingly while testing ~@bhaskerkode, Last updated: June 25, 2013
-module(test_ssl).
-author('Bhasker Kode').
-compile([export_all]).
-define(USE_ACCEPT_TIMEOUT,false). %% ssl:ssl_accept is passed a timeout
-define(USE_VERIFY_PEER,false). %% ssl:listen is passed {verify,verify_peer}
%% R15B02 => Works with/without ?USE_VERIFY_PEER Fails when ?USE_SSL_TIMEOUT
%% R15B03 => Works with/without ?USE_VERIFY_PEER Fails when ?USE_SSL_TIMEOUT
%% R16A => Fails* with/without ?USE_VERIFY_PEER Fails with/without ?USE_SSL_TIMEOUT
@bosky101
bosky101 / .gitconfig
Last active September 16, 2023 07:49
$ git pause <file>
# git pause <file>
# Stops tracking <file> if already in the repo
# Have SomeHeader.h that changes on every developers machine ?
# Want it in the repo, got still want the magic of .gitignore on the file ?
# easy
# git pause SomeHeader.h
# making changes to SomeHeader.h wont be staged, wont show in diff or status. perfect!
- (void)logDebugMessage:(NSString *)message
{
if (DEBUG_LOG)
{
message = [NSString stringWithFormat:@"LOG: %@ \n", message];
NSLog(@"%@", message);
}
}