Skip to content

Instantly share code, notes, and snippets.

View bcg's full-sized avatar

Brenden Grace bcg

View GitHub Profile
@bcg
bcg / test.sh
Created January 25, 2017 15:56
#!/bin/sh
$this=$that
@bcg
bcg / port.sh
Created January 25, 2016 15:59
address=127.0.0.1
port=8080
echo "Waiting on TCP connection to $address:$port"
while ! exec 6<>/dev/tcp/${address}/${port}; do
sleep 2
done
$ jruby -v
jruby 9.0.3.0 (2.2.2) 2015-10-21 633c9aa Java HotSpot(TM) 64-Bit Server VM 25.51-b03 on 1.8.0_51-b16 +jit [darwin-x86_64]
$ jruby snippit.rb
Unhandled Java exception: java.lang.RuntimeException: Could not generate DH keypair
java.lang.RuntimeException: Could not generate DH keypair
checkThrown at sun/security/ssl/Handshaker.java:1429
checkTaskThrown at sun/security/ssl/SSLEngineImpl.java:535
readNetRecord at sun/security/ssl/SSLEngineImpl.java:813
unwrap at sun/security/ssl/SSLEngineImpl.java:781
unwrap at javax/net/ssl/SSLEngine.java:624
#!/bin/bash
ENVS=(`env|grep _TCP_ADDR`)
for addr_env in "${ENVS[@]}"
do
address=`echo $addr_env|cut -d \= -f 2`
port=`printenv ${addr_env%_ADDR*}_PORT`
echo "Waiting on TCP connection to $address:$port"
while ! exec 6<>/dev/tcp/${address}/${port}; do
sleep 2
require 'dfp_api'
require 'dfp_api_statement'
require 'pp'
API_VERSION = :v201508
@bcg
bcg / t.md
Last active December 26, 2015 03:08
t a s
asdasds asd s
s s s
| T | b |
| sadadsa | asdasd |
| s | a |
@bcg
bcg / ftp.txt
Created December 6, 2012 11:00
FTP Download Rates From Doubleclick FTP
root@dlp3:/home/brenden# traceroute -I ftp.doubleclick.net
traceroute to ftp.doubleclick.net (70.32.146.198), 30 hops max, 60 byte packets
1 collective-media.net (74.86.182.65) 0.273 ms 0.778 ms 0.779 ms
2 ae13.dar02.sr01.dal01.networklayer.com (66.228.118.189) 0.148 ms 0.159 ms 0.159 ms
3 ae14.bbr01.eq01.dal03.networklayer.com (173.192.18.252) 0.199 ms 0.208 ms 0.207 ms
4 50.97.16.37 (50.97.16.37) 0.207 ms 0.695 ms 0.695 ms
5 72.14.233.77 (72.14.233.77) 0.695 ms 0.695 ms 0.695 ms
6 72.14.237.215 (72.14.237.215) 0.420 ms 72.14.237.219 (72.14.237.219) 0.488 ms 0.489 ms
7 209.85.240.83 (209.85.240.83) 36.105 ms 36.572 ms 209.85.240.81 (209.85.240.81) 33.654 ms
tasklist = 'aof-stuff'
task = 'cp-aofs'
if hostname ~= /serf/
SWFJob.wait_on(tasklist,task) do |result|
if system('cp this to/that')
result = SWFJob.SUCCESS
else
result = SWFJob.FAIL
@bcg
bcg / worksforme.txt
Created March 15, 2012 17:38
petrol
petrol(master)$ nvm use 0.6.2
Now using node v0.6.2
petrol(master)$ rake
rm -rf ./node_modules
npm WARN [email protected] package.json: bugs['web'] should probably be bugs['url']
> [email protected] preinstall /Users/bcg/Projects/Collective/petrol/node_modules/hiredis
> make || gmake
cd deps/hiredis && make static