Skip to content

Instantly share code, notes, and snippets.

View robertweiss's full-sized avatar

Robert Weiss robertweiss

View GitHub Profile
{
"folders":
[
{
"name": "Base Templates",
"path": "./public/site/templates",
"folder_exclude_patterns": ["node_modules"],
"file_exclude_patterns": [".*", "admin.php", "npm-debug.log", "yarn.lock"]
}
]
@robertweiss
robertweiss / .jshintignore
Last active August 29, 2015 14:19
RW Gulp Boilerplate
assets/js/vendor/**/*.js
assets/bower_components/**/*.js
assets/cmp/**/*.js
<?php
class Log extends WireData implements Module {
/**
* getModuleInfo is a module required by all modules to tell ProcessWire about them
*
* @return array
# local PHP Server
server() {
url="localhost:${2:-8000}"
if [ -z "$1" ]; then
php -S $url & # run server in background
else
php -S $url -t $1 &
fi
sleep 0.3s # wait for server to start

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
@robertweiss
robertweiss / modx-firstchildid.snippet.php
Last active December 10, 2015 10:28
MODX – Get id of first child
<?php
/**
* FirstChildId
* Gets the first child id of the given id. Works as output filter.
* Example use: [[*id:FirstChildId]]
*
* @autor Bert Oost at OostDesign.nl <bert@oostdesign.nl>
*/
$id = (!empty($input)) ? $input : false;
@robertweiss
robertweiss / html-web-app-header
Last active December 9, 2015 21:48 — forked from tfausak/ios-8-web-app.html
HTML – Web-app headbereich mit apple icon-refs
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="yes" name="apple-mobile-web-app-capable">
<title></title>
<!-- iPhone -->
<link href="http://taylor.fausak.me/static/images/apple-touch-icon-57x57.png"
@robertweiss
robertweiss / Sublime Text Shortcuts
Created December 14, 2012 19:41 — forked from lucasfais/gist:1207002
Sublime Text Shortcuts
h1. Sublime Text 2 - Useful Shortcuts (Mac OS X)
h2. General
| *⌘T* | go to file |
| *⌘⌃P* | go to project |
| *⌘R* | go to methods |
| *⌃G* | go to line |
| *⌘KB* | toggle side bar |
| *⌘⇧P* | command prompt |