Skip to content

Instantly share code, notes, and snippets.

View henrypoydar's full-sized avatar
🤓

Henry Poydar henrypoydar

🤓
View GitHub Profile
@henrypoydar
henrypoydar / iOS-8-web-app.html
Last active January 13, 2021 13:18 — forked from tfausak/ios-8-web-app.html
iOS 8 Web App
<!doctype html>
<html>
<head>
<!-- Run in full-screen mode. -->
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Make the status bar black with white text. -->
<meta name="apple-mobile-web-app-status-bar-style" content="black">
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
#RP5_HOME: "" # windoes users should set this
PROCESSING_ROOT: "/usr/share/processing" # Works for ArchLinux
#PROCESSING_ROOT: "/home/tux/processing-2.1.0" # Other linux distros with user tux
#PROCESSING_ROOT: "/Applications/Processing.app/Contents/Resources/Java" # Path for Mac?
#PROCESSING_ROOT: "C:\Java\processing-2.1.0" # if you follow PhiLhos suggestion for windoes
require 'rubygems'
require 'mongoid'
Mongoid.configure do |config|
config.master = Mongo::Connection.new.db("mongoid_key_test")
end
Mongoid.master.collection("users").drop
class User
" Vim color file
" Maintainer: Roman Gonzalez <romanandnreg at gmail dot com>
" Last Change: 2009 Aug 11
" Version: 0.0.1
" Screenshot: http://img.skitch.com/20090811-ti4b27qbftjybmau32ruygjjwx.jpg
" URL: http://blog.romanandreg.com
" For now this will only work on gvim
set background=dark
module SeleniumHelpers
# Execute JavaScript in the context of your Selenium window
def run_javascript(javascript)
driver.get_eval <<-JS
(function() {
with(this) {
#{javascript}
}
}).call(selenium.browserbot.getCurrentWindow());
JS
function queryObject() {
var pairs, pair;
var query = new Array;
pairs = document.location.search.slice(1).split('&');
for(var i = 0; i < pairs.length; i++) {
pair = pairs[i].split('=');
query[pair[0]] = pair[1];
}
return query;
}