Skip to content

Instantly share code, notes, and snippets.

View CodeVachon's full-sized avatar
:octocat:
Busy Coding...

Christopher Vachon CodeVachon

:octocat:
Busy Coding...
View GitHub Profile
@CodeVachon
CodeVachon / app.js
Created August 14, 2015 19:18
Sifting Through Promise Docs Ex
function myCallingMethod() {
var _deferred = new $.Deferred()
var _myValue = 123;
setTimeout(function() {
_deferred.resolve(_myValue);
}, 500);
return _deferred.promise();
}
var myPromise = myCallingMethod();
@CodeVachon
CodeVachon / index.js
Created March 4, 2016 19:51
How to Modify a DoubleClick Advertisement
$(document).ready(function() {
/*
* ...
* Load in DFP Loading Code, the important thing here is that we
* are adding in tht `slotRenderEnded` Event Listener. When triggered,
* it will fire the slotRenderedEventMethod function listed below.
*/
googletag
.pubads()
.addEventListener('slotRenderEnded', slotRenderedEventMethod)
@CodeVachon
CodeVachon / gulpfile.babel.js
Last active November 25, 2017 16:44
React Setup with Babel, Gulp, and Browserify
import gulp from 'gulp';
import browserify from 'browserify';
import source from 'vinyl-source-stream';
import buffer from 'vinyl-buffer';
import eslint from 'gulp-eslint';
import exorcist from 'exorcist';
import browserSync from 'browser-sync';
import watchify from 'watchify';
import babelify from 'babelify';
import uglify from 'gulp-uglify';
@CodeVachon
CodeVachon / kettleTemp.ino
Created December 1, 2016 04:09
A State Machine for my Arduino Beer Kettle Temperature Display
// LCD SHIELD
// include the library code:
#include <Wire.h>
#include <utility/Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
#define OFF 0x0
#define RED 0x1
#define YELLOW 0x3
import React from 'react';
export default class CircleGauge extends React.Component {
constructor(props) {
super(props);
this.state = {};
} // close constructor
render () {
@CodeVachon
CodeVachon / compiled.css
Created May 15, 2019 01:28
My SCSS respondTo media query mixin
.profile .title {
font-size: 1.6rem;
font-weight: bold;
}
@media screen and (min-width: 0) and (max-width: 1087px) {
.profile .title {
font-size: 1.3rem;
}
}
@CodeVachon
CodeVachon / response.json
Last active September 2, 2019 18:16
GET:/rest/books/
// GET:/rest/books/
[
{
"id": "IaNFbTL33g",
"title": "Thrawn",
"deck": "In this definitive novel, readers will follow Thrawn’s ...",
"language": "english",
"coverImage": "/images/91SxgwHMc0L.jpg",
"publishDate": "2017-04-11",
"created": "...",