Skip to content

Instantly share code, notes, and snippets.

@pcarranzav
pcarranzav / test.coffee
Created October 20, 2016 22:51
Simple test for node-docker-delta
Promise = require 'bluebird'
request = require 'request'
progress = require 'request-progress'
DELTA_REQUEST_TIMEOUT = 15 * 60 * 1000
config = { deltaHost: 'https://delta.resinstaging.io' }
imgSrc = 'resin/armhf-alpine:3.4-20161018'
imgDest = 'registry.resinstaging.io/testaufsdiff/75be750cca0c92d7286a48377af1ae24a589efb3:latest'
dockerDelta = require 'docker-delta'
new Promise (resolve, reject) ->
#!/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
@kentcdodds
kentcdodds / get-watchers.js
Last active December 4, 2023 22:34
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)));
@vladimir-ivanov
vladimir-ivanov / RouteProviderRegex.js
Created July 17, 2013 15:47
Adding support for Regex in $routeProvider for angularjs. Makes the matches available in $routeParams Need to add App.provider('$route', App.Lib.RouteProviderRegex); And the actual $routeProvider.when(/someRegexHere/);
/**
* @ngdoc object
* @name ng.$routeProvider
* @function
*
* @example
* add this to the App
* App.provider('$route', App.Lib.RouteProviderRegex);
*
* And
@xtian
xtian / html5boilerplate.jade
Last active December 23, 2023 15:05
HTML5 Boilerplate in jade
!!! 5
html(class='no-js')
head
meta(charset='utf-8')
meta(http-equiv='X-UA-Compatible', content='IE=edge')
title
meta(name='description', content='')
meta(name='viewport', content='width=device-width, initial-scale=1')
@shripadk
shripadk / gist:552554
Created August 27, 2010 00:59
Setting up Heroku Hostname SSL with GoDaddy SSL Cert
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
@weaver
weaver / setup.js
Created August 4, 2010 15:33
Manage library and external dependency folders in your Node.JS project.
//// setup.js -- add packages to require.paths
///
/// Manage library folders and external dependency folders in your
/// project by including setup.js in your project. Call it from the
/// beginning of your project's entry-point to adjust require.paths.
///
/// For example, if you're making an application structured like this:
///
/// README
/// app.js # main program