Skip to content

Instantly share code, notes, and snippets.

View mhaylock's full-sized avatar

Mark Haylock mhaylock

  • abitofthought.com
  • Christchurch, New Zealand
View GitHub Profile
@mhaylock
mhaylock / no_animations.rb
Last active May 2, 2017 17:08 — forked from keithtom/no_animations.rb
Rack Middleware to disable Disable CSS3/jQuery Animations for Capybara
module Rack
# disable CSS3 and jQuery animations in test mode for speed, consistency and avoiding timing issues.
# Usage for Rails:
# in config/environments/test.rb
# config.middleware.use Rack::NoAnimations
class NoAnimations
def initialize(app, options = {})
@app = app
end
@mhaylock
mhaylock / boost.sh
Last active October 29, 2015 02:58 — forked from faithfracture/boost.sh
Boost build script for iOS (armv7, armv7s, arm64), iOS Simulator (i386, x86_64), and OSX (i386, x86_64)
#===============================================================================
# Filename: boost.sh
# Author: Pete Goodliffe
# Copyright: (c) Copyright 2009 Pete Goodliffe
# Licence: Please feel free to use this, with attribution
# Modified version
#===============================================================================
#
# Builds a Boost framework for iOS, iOS Simulator, and OSX.
# Creates a set of universal libraries that can be used on an iOS and in the
/* This is a FluidApp userscript for Google Inbox for Mac.
Includes options for total badge count and unread badge count.
1) You need the paid version of FluidApp (http://fluidapp.com/)
2) Point Fluid to https://inbox.google.com (I recommend the icon from here: https://medium.com/@chrismessina/create-an-icon-for-google-inbox-in-your-dock-ed269312e3bc)
3) Set the user-agent to Chrome
4) Go to window -> userscript and add click the plus sign under the first table (on the left). Name the item 'Inbox'.
5) In the second table (on the right) click the plus and type in "*inbox.google.com*".
6) Paste the contents of this document into the script area below that.
7) Configure badge count (for total or unread only) in the code below.

foo

  1. index is the 0 based index value of the button pressed

  2. label is the text label of the button pressed

         function showConfirm() {
             var confirmDelegate = navigator.notification.confirm(
                 'You are the winner!',  // message
    

'Game Over', // title