Skip to content

Instantly share code, notes, and snippets.

View knorrium's full-sized avatar

Felipe Knorr Kuhn knorrium

View GitHub Profile
@ekashida
ekashida / index.css
Created October 21, 2014 04:48
Events dispatched by Good Guy Mobile Safari on almost-clicks
div {
padding: 20px 0;
margin: 5px 0;
background-color: lightgreen;
outline: 1px solid blue;
display: inline-block;
}
a {
background-color: yellow;
}
sinatra
rmagick
@fhwang
fhwang / gist:1887192
Created February 22, 2012 20:55
Rake tasks for running spec files that match a pattern. Developed for the good folks at HowAboutWe.
namespace :spec do
namespace :units do
desc "Run unit specs with PATTERN in the spec file name"
RSpec::Core::RakeTask.new(:selective => "db:test:prepare") do |t|
t.pattern = FileList["spec/**/*#{ENV['PATTERN']}*_spec.rb"].exclude("spec/integration/**/*_spec.rb")
end
end
namespace :integration do
desc "Run integration specs with PATTERN in the spec file name"
@mscottford
mscottford / gist:5707976
Last active December 18, 2015 01:59
Command used to build Ruby 2.0.0-p353 with rbenv, optimization values and readline from homebrew
env CFLAGS='-march=corei7-avx -O2 -pipe' RUBY_CONFIGURE_OPTS="--with-readline-dir=`brew --prefix readline`" rbenv install 2.0.0-p353
@n1k0
n1k0 / console-toggle.sublime-keymap
Created June 28, 2013 20:57
Toggle the Sublime Text console the same way you do with the Firefox devtools (⌘ + ⌥ + k)
[
{ "keys": ["command+alt+k"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
]
@dbwest
dbwest / Gemfile
Last active December 23, 2015 00:09
An example script, and accompanying Gemfile, to use for automating the Chrome mobile browser on an Android device. Tested on OS X Mountain Lion. Appium installed using node for CLI. If you don't have a fast android emulator, try genymotion...
source "http://rubygems.org"
gem 'watir-webdriver'
gem 'selenium-webdriver'
@feelobot
feelobot / Readme.md
Created November 4, 2013 21:47
Troubleshooting Webview with Ruby:

Once this is included in your project you can use

Helper.find_web_element("div#ad_banner")

If if does not work then the element does not exist. I am sure the code can be cleaned up but this is how I managed to solve my issues with hybrid app testing.

@noreiller
noreiller / backup-full.sh
Last active January 4, 2016 16:30
Geeksphone Peak backup scripts
#!/bin/sh
BACKUP_DATE=`date +%Y-%m-%d_%H-%M-%S`
BACKUP_DIR="~/PEAK/BACKUPS/$BACKUP_DATE"
mkdir -p "$BACKUP_DIR"
cd "$BACKUP_DIR"
sudo adb pull /data/local/storage/persistent/
$(document).ready(function() {
var embedGist = function () {
$('a[href^="https://gist.github.com"]').each(function(i) {
if (writeCapture) {
var wrapper = $("<div></div>");
wrapper.insertAfter(this);
writeCapture.html(wrapper[0], '<script src="'+$(this).attr("href")+'.js"></script>');
$(this).remove();
} else {
@guilhermechapiewski
guilhermechapiewski / gist:6066682
Created July 23, 2013 22:21
Creates a "git lg" alias that displays a pretty nicely formatted git log output.
git config --global alias.lg=log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative