Skip to content

Instantly share code, notes, and snippets.

View hubertusanton's full-sized avatar

Bart van Irsel hubertusanton

View GitHub Profile

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
#!/bin/bash
#
# ss-upgrader.sh
#
# INTRODUCTION
#
# There are some threads on the SS forums that describe the techdocs for upgrading a 2.4 site to 3.x as being too technical. Mainly from content authors who
# also happen to be site maintainers - they are not coders.
# The aim of this script is to therefore to automate - in as much as this is possible in a user-configured, open-source software project - to help those new to
# SS3 upgrade from 2.x as smoothly as possible.
function is_mobile() {
var agents = ['android', 'webos', 'iphone', 'ipad', 'blackberry','Android', 'webos', ,'iPod', 'iPhone', 'iPad', 'Blackberry', 'BlackBerry'];
var ismobile=false;
for(i in agents) {
if (navigator.userAgent.split(agents[i]).length>1) {
ismobile = true;
}
}
return ismobile;
}
<% loop $Menu(1) %>
$RenderLayout
<% end_loop %>