Skip to content

Instantly share code, notes, and snippets.

View kevin-miles's full-sized avatar
🦞

kevin-miles

🦞
View GitHub Profile
As screen is not maintained anymore you should look for modern alternatives like tmux.
tmux is superior for many reasons, here are just some examples:
Windows can be moved between session and even linked to multiple sessions
Windows can be split horizontally and vertically into panes
Support for UTF-8 and 256 colour terminals
Sessions can be controlled from the shell without the need to enter a session
Basic Functionality
@kevin-miles
kevin-miles / gist:78924bafdc56860deadf
Created November 10, 2014 15:53
browserstack breach email
Dear BrowserStack User,
We are unfortunately displeased to announce that BrowserStack will be shutting down. After much consideration on our part, we have realized we were negligent in the services we claimed to offer. In our terms of service, we state the following:
[...] after the restoration process is complete, the virtual machines are guaranteed to be tamper-proof.
[...] The machines themselves are in a secure network, and behind strong firewalls to present the safest environment possible.
[...] At any given time, you have sole access to a virtual machine. Your testing session cannot be seen or accessed by other users, including BrowserStack administrators. Once you release a virtual machine, it is taken off the grid, and restored to its initial settings. All your data is destroyed in this process.
@kevin-miles
kevin-miles / gist:e3f5d5aa79e8fc14ba0a
Created November 5, 2014 17:03
iScroll execute scroll to bottom using selenium
// selenium tests were failing because an element was not in visual sight
// we were using iScroll, so we couldnt scroll using normal functions
// how to fix? execute JS in your selenium script. initialize a new IScroll object(preferably similar to the actual initalization in the current script). Scroll to bottom.
var NavScroll = new IScroll('#nav-scroll', {
mouseWheel: true,
scrollbars: 'custom',
interactiveScrollbars : true,
tap: true,
preventDefault: false
@kevin-miles
kevin-miles / gist:3d854181aaede5c6e3a8
Created October 8, 2014 00:01
compare two files by line and print differences between them
grep -F -x -v -f a.txt b.txt
@kevin-miles
kevin-miles / gist:62044eea87c662fab028
Created October 7, 2014 00:10
selenium java heap error (out of memory) fix
use the following argument to increase the maximum heap size:
-Xmx<size> set maximum Java heap size
example:
java -Xmx512m -jar selenium-server-standalone-2.42.2.jar
@kevin-miles
kevin-miles / gist:2ee61f3a5570c4efab15
Created October 6, 2014 18:48
create file from command line with explicit size
dd if=/dev/zero of=output.dat bs=50m count=1
or
dd if=/dev/zero of=output.dat bs=1m count=50
@kevin-miles
kevin-miles / gist:8c2b7bb9633db574a17f
Created September 22, 2014 16:05
Geny motion failed to import OVA
clear cache in settings
@kevin-miles
kevin-miles / gist:9d96bc42c9dd3d6f0d11
Created September 17, 2014 18:31
cURL a url and return status code
curl -o /dev/null --silent --head --write-out '%{http_code}' https://wordpress.org/plugins/
@kevin-miles
kevin-miles / gist:a48dd2a64d0cb5ea2c50
Created September 17, 2014 02:37
cURL file of URLs and print response
#!/bin/bash
while read LINE; do
curl -o /dev/null --silent --head --write-out '%{http_code}' "$LINE"
echo " $LINE"
done < url-list.txt
@kevin-miles
kevin-miles / gist:15113c21fe6918cb8285
Created September 11, 2014 06:03
Loop Status Check Link
while true; do wget --spider -S "http://some/url/here" 2>&1 | grep "HTTP/" | awk '{print $2}'; sleep 0; done