Skip to content

Instantly share code, notes, and snippets.

View assertchris's full-sized avatar

Christopher Pitt assertchris

View GitHub Profile
@assertchris
assertchris / t.js
Created September 28, 2012 13:19 — forked from wayneashleyberry/t.js
simple templating
/**
* simple mustache-like templater
* http://mir.aculo.us/2011/03/09/little-helpers-a-tweet-sized-javascript-templating-engine/
* -----------------------------------------------------------------------------------------
* t('Hello, {{planet}}!', {'planet': 'World'});
* returns 'Hello, World!';
*/
function t(s,d){
for(var p in d)
s=s.replace(new RegExp('{{'+p+'}}','g'), d[p]);
@assertchris
assertchris / rules.md
Last active January 2, 2016 20:19 — forked from machuga/rules.md

Asking for help in #laravel on Freenode

Please behave in a polite, considerate, and inclusive manner in the channel at all times. People volunteer their time in the channel to help people like you with your Laravel problems and some respect (in both directions) will go an extremely long way.

When asking questions in the #laravel channel, please follow these 12 simple rules.

  1. Do your research before hand. Your question may be answerable with a quick Google search or by simply experimenting. If it's a concept you're confused about, first check out our Official Documentation. If you're using a method in Laravel, you can look it up in the API Docs.
  2. If you've tried Googling, explain what terms you've tried to use so people can better help you.
  3. Clearly explain what is happening and create a Help Request (http://help.laravel.io) to better explain yourself, or just a simple Gist (http://gist.github.com) if you are just creating a simple example
#!/usr/bin/env bash
function is_browser {
local path=$1
local basename=$(basename $path)
if [[ $basename = "chromium-browser" ]]; then
return 1
fi