#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
// HOWTO: load LABjs itself dynamically! | |
// inline this code in your page to load LABjs itself dynamically, if you're so inclined. | |
(function (global, oDOC, handler) { | |
var head = oDOC.head || oDOC.getElementsByTagName("head"); | |
function LABjsLoaded() { | |
// do cool stuff with $LAB here | |
} |
/* | |
Copyright (c) 2011 Andrei Mackenzie | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
module Regex (match) where | |
import Data.List | |
data Token = C Char | Start | End deriving (Eq) | |
match :: String -> String -> Bool | |
match re = not . null . filter (not.null) . fmap match' . tails . tokenize | |
where match' = flip (foldl' (>>=)) (compile re) . return | |
tokenize = (Start:) . (++[End]) . map C |
# # your config.ru | |
# require 'unicorn_killer' | |
# use UnicornKiller::MaxRequests, 1000 | |
# use UnicornKiller::Oom, 400 * 1024 | |
module UnicornKiller | |
module Kill | |
def quit | |
sec = (Time.now - @process_start).to_i | |
warn "#{self.class} send SIGQUIT (pid: #{Process.pid})\talive: #{sec} sec" |
-- Launches ScanSnap Manager, if necessary. Opens the ScanSnap Manager settings window, | |
-- changes to named profile, applies changes, and closes the window | |
-- Example: | |
SwitchToProfile("Standard") | |
on SaveActiveApplication() | |
return application | |
end SaveActiveApplication | |
on OpenOptionsWindow() |
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
#To install ruby-debug on Ubuntu ruby-1.9.3 you need to download from http://rubyforge.org/frs/?group_id=8883 | |
linecache19-0.5.13.gem | |
ruby_core_source-0.1.5.gem | |
ruby-debug19-0.11.6.gem | |
ruby-debug-base19-0.11.26.gem | |
#Then in your console | |
export RVM_SRC=/your/path/to/ruby-1.9.3 |
#!/bin/sh | |
# Written by Mike Ensor ([email protected]) | |
# Copywrite 2012 | |
# Use as needed, modify, have fun! | |
# This is intended to be used for Maven3 + Mac OSX | |
# | |
# To use: | |
# in your ".bashrc" or ".bash_profile" add the following line: | |
# source ~/<path to script>/colorize-maven.sh |
As configured in my dotfiles.
start new:
tmux
start new with session name: