This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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": "...", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export default class CircleGauge extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = {}; | |
} // close constructor | |
render () { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function myCallingMethod() { | |
var _deferred = new $.Deferred() | |
var _myValue = 123; | |
setTimeout(function() { | |
_deferred.resolve(_myValue); | |
}, 500); | |
return _deferred.promise(); | |
} | |
var myPromise = myCallingMethod(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ASSUME JQUERY | |
var document_cache = []; | |
function getDocument(documentId) { | |
var _deferred = new $.Deferred() | |
_document_sent = false; // Note that this could be removed by using `_deferred.state()` | |
; | |
// Iterate over the document_cache array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'), | |
app = express(), | |
port = process.env.PORT || 3030, | |
myModule = require('./myModule') | |
; | |
app.use(express.static(__dirname + '/public')); | |
app.get('/', function(request, response, next) { | |
myModule("Hello World", function(error, result) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express'), | |
app = express(), | |
port = process.env.PORT || 3030, | |
myModule = require('./myModule') | |
; | |
app.get('/', function(request, response, next) { | |
myModule("Hello World").done(function(result) { | |
response.json(result); | |
}).fail(function(error) { |
NewerOlder