Skip to content

Instantly share code, notes, and snippets.

Avatar

Wojciech Adam Koszek wkoszek

View GitHub Profile
@wkoszek
wkoszek / wget
Last active Oct 4, 2015
wget in 9 lines of Python for running in hostile environments (aka. how to fetch HTTPS stuff on Synology DS214play)
View wget
#!/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 Oct 12, 2015
enable travis from the command line
View travis
travis enable
travis init
travis settings -s yes builds_only_with_travis_yml
@wkoszek
wkoszek / nginx_travis.conf
Created Nov 1, 2015
Minimal nginx config for Travis (or other) CI system
View nginx_travis.conf
worker_processes 10;
pid /tmp/nginx.pid;
error_log /tmp/error.log;
events {
worker_connections 768;
}
http {
View brew_starting_postgres
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 Nov 20, 2015
imagemagick debugging
View pnggen.sh
#!/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
View pnggen2.sh
#!/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
View test
http://proquest.safaribooksonline.com.ezproxy.plsinfo.org:2048/book/programming/ruby/9780133487954/firstchapter#X2ludGVybmFsX0h0bWxWaWV3P3htbGlkPTk3ODAxMzM0ODc5NTQlMkZjaDAxX2h0bWwmcXVlcnk9
View Chunked encoding
<?php
$beuwulf = "zxcv1234bnm,1234asdf1234ghjk1234qwer1234rtyu1234uiop1234";
header("Content-Type: text/plain; charset=UTF-8");
header_remove("Content-Length");
header("Transfer-Encoding: chunked");
ob_start();
View gist:d52486a6b1cf8eeb021603aa9e4c031e
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
View appium_1_5_1_after_ios_driver_update
[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'
You can’t perform that action at this time.