Skip to content

Instantly share code, notes, and snippets.

View alanmoo's full-sized avatar

Alan Mooiman alanmoo

View GitHub Profile
function WebAnalytics() {
var _dntStatus = navigator.doNotTrack || navigator.msDoNotTrack;
var fxMatch = navigator.userAgent.match(/Firefox\/(\d+)/);
var ie10Match = navigator.userAgent.match(/MSIE 10/i);
var w8Match = navigator.appVersion.match(/Windows NT 6.2/);
@pascalpp
pascalpp / myview.js
Last active November 23, 2015 02:40
using a CSS module 'scope' with less and webpack's css loader
'use strict';
var styles = require('./styles.less');
// styles => { 'scope': 'oasduf98aus9df8ja9s8d' }
// this view uses the given scope as its classname
// so buttons in my view will be gold and green
// the color of buttons outside my view will not be affected
module.exports = Marionette.LayoutView.extend({

Stealing WiFi

/etc/hosts

This will let you access any google owned site. This includes: youtube, google cache, google translate, google search, gmail, google news, etc.

  • Install the HTTPS Everywhere extension
  • Add these rules to your /etc/hosts file
@digitaljhelms
digitaljhelms / post-rewrite
Last active February 4, 2024 14:15
Git hook to call `bower install` and `npm install` automatically.
#!/bin/sh
echo "[post-rewrite hook: $1]"
# by noahgrant & digitaljhelms
#
# quick script to call "bower install" and "npm install" automatically if
# bower.json or package.json are changed, respectively
#
# this assumes one top-level file for each
@afeld
afeld / gist:5201086
Last active August 17, 2023 18:43
job boards
@cowlby
cowlby / collection_widget.twig
Created October 17, 2011 23:32
Customizing form collections in Symfony2
{% block collection_widget %}
{% spaceless %}
<div class="collection">
{% if prototype is defined %}
{% set attr = attr|merge({'data-prototype': block('collection_item_widget') }) %}
{% endif %}
<div {{ block('widget_container_attributes') }}>
{{ form_errors(form) }}
<ul>
{% for rows in form %}
@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods