Skip to content

Instantly share code, notes, and snippets.

@Arwid
Arwid / migrations.js
Created June 20, 2017 21:46 — forked from vincentbernat/migrations.js
Test database migration result with Sequelize.js
'use strict';
var setup = require('../.'),
should = require('should'),
path = require('path'),
Sequelize = require('sequelize'),
db = require('../../lib/db'),
config = require('../../lib/config'),
logger = require('../../lib/logger');
#!/bin/sh
git filter-branch --env-filter '
OLD_EMAIL="[email protected]"
CORRECT_NAME="Your Correct Name"
CORRECT_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ]
then
@Arwid
Arwid / get-watchers.js
Last active August 29, 2015 14:27 — forked from kentcdodds/get-watchers.js
Get Watchers of element and its children
function getWatchers(root) {
root = angular.element(root || document.documentElement);
var watcherCount = 0;
function getElemWatchers(element) {
var isolateWatchers = getWatchersFromScope(element.data().$isolateScope);
var scopeWatchers = getWatchersFromScope(element.data().$scope);
var watchers = scopeWatchers.concat(isolateWatchers);
angular.forEach(element.children(), function (childElement) {
watchers = watchers.concat(getElemWatchers(angular.element(childElement)));
How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS
Heroku recently added an exciting new 'Hostname SSL' option. This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).
The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project. Before we begin, let's list what we're using here:
* Heroku Hostname SSL
* GoDaddy Standard SSL Certificate
* Zerigo DNS
@Arwid
Arwid / HideMobileAddressBar.js
Created March 19, 2012 04:10 — forked from mhammonds/HideMobileAddressBar.js
Hide Browser Address Bar - Android + iPhone
function hideAddressBar()
{
if(!window.location.hash)
{
if(document.height < window.outerHeight)
{
document.body.style.height = (window.outerHeight + 50) + 'px';
}
setTimeout( function(){ window.scrollTo(0, 1); }, 50 );
@Arwid
Arwid / SubViews.html
Created May 6, 2011 05:43 — forked from johnreilly/SubViews.html
My attempt at using Backbone.js views to render other "sub-views"
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script src="js/jquery.js" type="text/javascript"></script>
<script src="js/underscore.js" type="text/javascript"></script>
<script src="js/backbone.js" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8">
$(function(){
@Arwid
Arwid / all_the_toys.rb
Created May 6, 2011 01:35 — forked from quinn/all_the_toys.rb
all the fun stuff i use in my default stack!
# gems
gem 'resque'
# the data
gem 'devise'
gem 'carrierwave'
gem 'fog'
gem 'rmagick'
# controllers and views