Skip to content

Instantly share code, notes, and snippets.

View aerickson's full-sized avatar

Andrew Erickson aerickson

View GitHub Profile
@tehprofessor
tehprofessor / watir_phantomjs_user_agent_settings.rb
Created May 1, 2013 18:28
Configuring Watir to use a custom user agent with the PhantomJS driver. The user agent gem has been deprecated, and this functionality is not documented anywhere (obvious).
require 'watir-webdriver'
capabilities = Selenium::WebDriver::Remote::Capabilities.phantomjs("phantomjs.page.settings.userAgent" => "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36")
driver = Selenium::WebDriver.for :phantomjs, :desired_capabilities => capabilities
browser = ::Watir::Browser.new driver
# Quick test to make sure it's set
browser.goto 'http://www.useragentstring.com/'
browser.textarea(:id => "uas_textfeld").value
@cuibonobo
cuibonobo / \boot\cmdline.txt
Created May 30, 2013 03:28
To use bootchart on the Raspberry Pi, `sudo apt-get install bootchart bootchart-view` and then add `init=/sbin/bootchartd` to the end of `/boot/cmdline.txt`
dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2 rootfstype=ext4 rootflags=commit=120,data=writeback elevator=deadline rootwait quiet init=/sbin/bootchartd
@willurd
willurd / set-wallpaper.sh
Last active January 18, 2020 11:02
Set the Desktop Background for all of your open Spaces in Mountain Lion
read -e IMAGE;
defaults write com.apple.desktop Background "{default = {ImageFilePath='$IMAGE'; };}"
killall Dock
@t-io
t-io / osx_install.sh
Last active October 22, 2023 13:04
Install most of my Apps with homebrew & cask
#!/bin/sh
echo Install all AppStore Apps at first!
# no solution to automate AppStore installs
read -p "Press any key to continue... " -n1 -s
echo '\n'
echo Install and Set San Francisco as System Font
ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)"
echo Install Homebrew, Postgres, wget and cask
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@avillafiorita
avillafiorita / .colors.csv
Created July 16, 2014 11:27
change osx terminal colors and font from the command line
LightPink1 #ffbdc5 255 189 197 {65535 48573 50629}
pink4 #9d777f 157 119 127 {40349 30583 32639}
pink3 #d7a3ad 215 163 173 {55255 41891 44461}
pink2 #f2b9c4 242 185 196 {62194 47545 50372}
pink1 #ffc3cf 255 195 207 {65535 50115 53199}
HotPink4 #9e4f75 158 79 117 {40606 20303 30069}
HotPink3 #d878a1 216 120 161 {55512 30840 41377}
HotPink2 #f383b5 243 131 181 {62451 33667 46517}
HotPink1 #ff87c1 255 135 193 {65535 34695 49601}
DeepPink4 #9e1e62 158 30 98 {40606 7710 25186}
@eyecatchup
eyecatchup / hammerhead-from-lrx21o-to-lrx22c.md
Last active November 1, 2023 08:35
A step-by-step guide how to manually flash the Android 5.0.1 (LRX22C) OTA-Update on a Nexus 5 with modified system (custom recovery/kernel, rooted, modified framework etc.)..

Update: For those interested, here's the version for updating from Android 5.1.0 (LMY47D/LMY47I) to Android 5.1.1 (LMY48B):
https://gist.github.com/eyecatchup/dab5cf7977008e504213


  UPDATE `NEXUS 5` 
     SET `VERSION`='5.0.1', `BUILD`='LRX22C', `RECOVERY`='CUSTOM', `ROOTED`=1 
   WHERE `VERSION`='5.0' && `BUILD`='LRX21O' && `RECOVERY`='CUSTOM' && `ROOTED`=1 
         && `WANNA_KEEP_USERDATA`=1;
@dpetersen
dpetersen / circle.yml.diff
Created March 11, 2015 16:28
CircleCI junit integration
commit 744cfc17ad795077a427b19d02c10e4f0b5008b7
Author: Don Petersen <don@donpetersen.net>
Date: Tue Mar 10 15:43:22 2015 -0600
Include circle-compatible test output.
diff --git a/circle.yml b/circle.yml
index a2763cf..ece9b30 100644
--- a/circle.yml
+++ b/circle.yml
@fhriley
fhriley / edgerouter-qos
Last active April 16, 2023 05:35
EdgeRouter Lite QOS for upload bandwidth
# new fq-codel style
delete traffic-control
set traffic-control smart-queue wan-qos interface eth1
set traffic-control smart-queue wan-qos rate-up 34mbit
set traffic-control smart-queue wan-qos limit 600
set traffic-control smart-queue wan-qos target 2ms
sudo tc qdisc change dev eth1 parent 1:10 handle 100: fq_codel quantum 300
@ribasco
ribasco / how-to-install-java-on-raspbian.md
Last active March 27, 2021 18:37
How to install the latest java version in Raspbian (Stretch)

Introduction

The default version of java provided in the latest raspbian images are outdated, so we are going to install from the ppa:webupd8team/java repository instead. Please note that add-apt-repository ppa:webupd8team/java will not work, so we will need to add the repository manually.

Installation

  1. Create the gpg key file and paste the following lines of text below
nano key.txt