Skip to content

Instantly share code, notes, and snippets.

View wkoszek's full-sized avatar
🎯
Focusing

Adam W. Koszek wkoszek

🎯
Focusing
View GitHub Profile
@wkoszek
wkoszek / wget
Last active October 4, 2015 07:59
wget in 9 lines of Python for running in hostile environments (aka. how to fetch HTTPS stuff on Synology DS214play)
#!/usr/bin/env python
import urllib2, sys
urlstr = sys.argv[1]
fname = urlstr.split('/')[-1]
response = urllib2.urlopen(urlstr)
f = open(fname, "w")
f.write(response.read())
f.close()
print "written " + fname
@wkoszek
wkoszek / travis
Last active October 12, 2015 04:28
enable travis from the command line
travis enable
travis init
travis settings -s yes builds_only_with_travis_yml
@wkoszek
wkoszek / nginx_travis.conf
Created November 1, 2015 22:24
Minimal nginx config for Travis (or other) CI system
worker_processes 10;
pid /tmp/nginx.pid;
error_log /tmp/error.log;
events {
worker_connections 768;
}
http {
@wkoszek
wkoszek / brew_starting_postgres
Created November 14, 2015 23:11
homebrew_debug
wk:~> sudo bash
Password:
bashrc
bash: /Users/root/.travis/travis.sh: No such file or directory
bash-3.2# brew uninstall
This command requires a keg argument
bash-3.2#
bash-3.2# brew uninstall postgres
Uninstalling /usr/local/Cellar/postgresql/9.4.5... (3021 files, 40M)
bash-3.2# ps axuw | grep postgres
@wkoszek
wkoszek / pnggen.sh
Last active November 20, 2015 06:17
imagemagick debugging
#!/bin/sh
set -x
convert -size 1000x1000 canvas:white date1.png
sleep 2
convert -size 1000x1000 canvas:white date2.png
sleep 2
convert -size 1000x1000 canvas:white date1.jpg
@wkoszek
wkoszek / pnggen2.sh
Last active November 20, 2015 06:28
#!/bin/sh
set -x
convert -size 1000x1000 canvas:white date1.png
sleep 2
convert -size 1000x1000 canvas:white date2.png
sleep 2
convert -size 1000x1000 canvas:white date1.jpg
@wkoszek
wkoszek / test
Created December 1, 2015 06:41
test
http://proquest.safaribooksonline.com.ezproxy.plsinfo.org:2048/book/programming/ruby/9780133487954/firstchapter#X2ludGVybmFsX0h0bWxWaWV3P3htbGlkPTk3ODAxMzM0ODc5NTQlMkZjaDAxX2h0bWwmcXVlcnk9
<?php
$beuwulf = "zxcv1234bnm,1234asdf1234ghjk1234qwer1234rtyu1234uiop1234";
header("Content-Type: text/plain; charset=UTF-8");
header_remove("Content-Length");
header("Transfer-Encoding: chunked");
ob_start();
@wkoszek
wkoszek / gist:d52486a6b1cf8eeb021603aa9e4c031e
Created April 7, 2016 23:32
appium_1_5_1_updated_ios_driver
npm install -g --no-shrinkwrap appium-ios-driver@1.11.1
/usr/local/lib
└─┬ appium-ios-driver@1.11.1
├── adm-zip@0.4.7
├─┬ appium-base-driver@1.4.1
│ ├─┬ request@2.70.0
│ │ ├── aws-sign2@0.6.0
│ │ ├─┬ aws4@1.3.2
│ │ │ └─┬ lru-cache@4.0.1
│ │ │ ├── pseudomap@1.0.2
[Appium] Welcome to Appium v1.5.1 (REV d5085edce0b5482771c66cfe3e2c013ee3ca90f6)
[Appium] Appium REST http interface listener started on 0.0.0.0:4723
[HTTP] --> POST /wd/hub/session {"desiredCapabilities":{"deviceName":"iPhone 6","nativeInstrumentsLib":true,"appName":"kitchensink","udid":"8dba6102d06d797316af744475b4fd6212d925b1","app":"/Users/wkoszek/r/autotest/ios/Kitchensink/build/KitchenSink.ipa","noReset":true,"autoLaunch":false,"newCommandTimeout":0,"platformVersion":"9.3","fullReset":false,"platformName":"iOS","showIOSLog":true}}
[MJSONWP] Calling AppiumDriver.createSession() with args: [{"deviceName":"iPhone 6","nativeInstrumentsLib":true,"appName":"kitchensink","udid":"8dba6102d06d797316af744475b4fd6212d925b1","app":"/Users/wkosz...
[Appium] Creating new IosDriver session
[Appium] Capabilities:
[Appium] deviceName: 'iPhone 6'
[Appium] nativeInstrumentsLib: true
[Appium] appName: 'kitchensink'
[Appium] udid: '8dba6102d06d797316af744475b4fd6212d925b1'