Skip to content

Instantly share code, notes, and snippets.

View ratbeard's full-sized avatar

Mike Frawley ratbeard

View GitHub Profile
.rainbow-text {
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-image: -webkit-gradient(linear, left top, left bottom,
color-stop(0.00, red),
color-stop(16%, orange),
color-stop(32%, yellow),
color-stop(48%, green),
color-stop(60%, blue),
color-stop(76%, indigo),
@ratbeard
ratbeard / gulpfile.coffee
Last active August 29, 2015 13:56
gulp if issue
src("coffee")
# For source maps we also need to move the coffee files into build
.pipe(gulpif(isDev, dest("build.coffee")))
.pipe(plumber())
.pipe(print())
.pipe(logErrors(coffee(sourceMap: isDev)))
.pipe(dest("build.coffee"))
# When isDev is true, only .coffee files ends up in build dir, no .js or .map files.
# print() prints out no files, its as if the pipeline chain halts
qrequest = require("request")
http = require('http')
fs = require('fs')
through = require('through')
split = require('split')
concat = require('concat-stream')
ws = require("websocket-stream")
trumpet = require('trumpet')()
spawn = require('child_process').spawn
duplexer = require('duplexer')
@ratbeard
ratbeard / gist:2655811a397c361746f9
Created July 8, 2014 21:04
disable-ng-animate classNameFilter
// This allows adding a class of `disable-ng-animate` to an element so that
// $animate won't attempt to add its animation hooks. This is useful when an
// element has animations applied via css classes, which can confuse
// directives like ng-repeat and ng-show sometimes.
app.config( [
'$animateProvider',
function ($animateProvider) {
$animateProvider.classNameFilter(/^((?!disable-ng-animate).)*$/)
link: function( $scope, $element ) {
var initialize, initializeRounds, initializeQuestionsCarousel // <--- dese are functions
var gameResult, didUserWin, user, opponent, questionsCarouselElement, userPointsPerRound, opponentPointsPerRound // <-- dese are data
@ratbeard
ratbeard / _.md
Last active August 29, 2015 14:05
Clean up jasmine output with sed

before: before

after: after

GET /people.json
[
{
// global props
id: 1
name: 'foo',
image: '...',
# Fetch latest and prints the branch name with the most recent commit¬
br = "!git fetch && git for-each-ref --count=1 --sort=-committerdate refs/remotes/ --format='%(refname:short)' | sed -e \"s/^.*\\//
¬
# Switch to branch with most recent commit¬
cor = "!git checkout `git br`"¬
¬
#!/bin/bash
if [ -z "${SAUCE_USERNAME}" ] || [ -z "${SAUCE_ACCESS_KEY}" ]; then
echo "This script can't run without your Sauce credentials"
echo "Please set SAUCE_USERNAME and SAUCE_ACCESS_KEY env variables"
echo "export SAUCE_USERNAME=ur-username"
echo "export SAUCE_ACCESS_KEY=ur-access-key"
exit 1
fi
SAUCE_TMP_DIR="$(mktemp -d -t sc.XXXX)"
"lodash.template": {
"version": "2.4.1",
"from": "lodash.template@^2.4.1",
"resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-2.4.1.tgz",
"dependencies": {
"lodash.defaults": {
"version": "2.4.1",
"from": "lodash.defaults@~2.4.1",
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-2.4.1.tgz",
"dependencies": {