Skip to content

Instantly share code, notes, and snippets.

View dflynn15's full-sized avatar

Daniel Flynn dflynn15

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dflynn15 on github.
  • I am djflynn15 (https://keybase.io/djflynn15) on keybase.
  • I have a public key ASC2wLi4cTUA0zb4D1uF_KTKm0wjbh1SFqDrUC_m_PK-1Qo

To claim this, I am signing this object:

{
forms: [
{
url: "https://pokeapi.co/api/v2/pokemon-form/1/",
name: "bulbasaur",
favorite: true
}
]
}
#!/bin/sh
#
# Pre-commit hook
# Lint stuff before committing
npm run perf-test
@dflynn15
dflynn15 / Capital.rb
Created February 16, 2016 20:41
Observable "Hunger Games" pattern
Class Capital
attr_reader :contestants
def initialize()
@contestants = []
end
def register(NewContestant)
puts "#{NewContestant.name} has entered the game!"
@contestants >> NewContestant
@dflynn15
dflynn15 / test.scss
Created January 12, 2015 16:49
Testing the formatting function in gists.
.hero {
// First, styles that all brands
// have in common.
// (The "shared stuff")
font-size: 2em;
font-weight: bold;
border: 1px solid;
// Next, brand-specific styles.
// (The "themed stuff")
@dflynn15
dflynn15 / gulpfile.js
Last active September 1, 2016 00:03
lcov-merger Gulp task
var gulp = require('gulp'),
merger = require ('lcov-result-merger');
gulp.task('merge-coverage', function() {
return gulp.src('./reports/coverage/**/lcov.info')
.pipe(merger())
.pipe(gulp.src('./reports/merged/'))
});
@dflynn15
dflynn15 / gulpfile.js
Last active August 29, 2015 14:10
Asynchronous example of gulp-jasmine-phantom
var gulp = require('gulp');
var jasmine = require('gulp-jasmine-phantom');
gulp.task('unitTests', function () {
return gulp.src('spec/test.js')
.pipe(jasmine());
});
gulp.task('integrationTests', function() {
return gulp.src('spec/test.js')
@dflynn15
dflynn15 / gulpfile.js
Last active August 29, 2015 14:10
Integration example of gulp-jasmine-phantom
var gulp = require('gulp');
var jasmine = require('gulp-jasmine-phantom');
gulp.task('default', function() {
return gulp.src('spec/test.js')
.pipe(jasmine({
integration: true
}));
});
@dflynn15
dflynn15 / xampp.sh
Created June 16, 2014 21:00
Fun bash script to write to XAMPP vhost and add symbolic link.
#!/bin/bash
# Format of command: ./xampp.sh new.website.name.com projectDir path/to/project/Dir
# Number of expected arguments
EXPECTED_ARGS=3
function create_symbolic_link {
sudo ln -s $1 /Applications/XAMPP/xamppfiles/htdocs/$2
}
@dflynn15
dflynn15 / mixin.less
Last active August 29, 2015 14:00
Conditional Media Query Mixin for LESS.
/*
* This is a LESS port of Sparkbox's module-based media queries mixin in SASS
* https://github.com/sparkbox/SB-Media
*
* Example use: http://codepen.io/dflynn15/pen/AHadk
* body{
* background-color:red;
*
* .sb-media(40em ,{
* background-color: blue;