Skip to content

Instantly share code, notes, and snippets.

View bhague1281's full-sized avatar

Brian Hague bhague1281

View GitHub Profile
@bhague1281
bhague1281 / linux-ubuntu.md
Created September 24, 2015 20:35
Installfest

General Assembly Logo

#Ubuntu install instructions

##Install Oh My ZSH

sudo apt-get update
sudo apt-get install git-core zsh
chsh -s /bin/zsh

General Assembly Logo

#Ubuntu install instructions

##Install Oh My ZSH

sudo apt-get update
sudo apt-get install git-core zsh
chsh -s /bin/zsh

General Assembly Logo

#WDI Seattle Install Fest

For the first portion of the class, we'll be working exclusively inside of the browser and Node. We'll be installing the following tools.

  • Homebrew
  • Git
  • Node
@bhague1281
bhague1281 / keybase.md
Created January 30, 2016 03:43
keybase

Keybase proof

I hereby claim:

  • I am bhague1281 on github.
  • I am brianhague (https://keybase.io/brianhague) on keybase.
  • I have a public key whose fingerprint is DC54 D3D9 B473 15CA 71C4 9833 DA1B 7AAD FF11 A208

To claim this, I am signing this object:

const request = require('request');
const API_ENDPOINT = 'http://pokeapi.co/api/v2/pokemon/';
request(API_ENDPOINT, (error, response, body) => {
console.log(body);
// {
// "count": 811,
// "previous": null,
// "results": [
// {
const NodeCache = require('node-cache');
const cache = new NodeCache();
let data = { results: [] };
// using the cache module to add an object to the cache
cache.set('my-pokemon', data, (err, success) => {
// success will be true if successful
});
const request = require('request');
const NodeCache = require('node-cache');
const API_ENDPOINT = 'http://pokeapi.co/api/v2/pokemon/';
const cache = new NodeCache();
// try getting data from the cache first
cache.get('my-pokemon', (err, data) => {
// return early if there's an error or data is available
if (err) return console.log(err);
const request = require('request');
const NodeCache = require('node-cache');
const API_ENDPOINT = 'http://pokeapi.co/api/v2/pokemon/';
const cache = new NodeCache();
// try getting data from the cache first
cache.get(API_ENDPOINT, (err, data) => {
// return early if there's an error or data is available
if (err) return console.log(err);
const request = require('request');
const NodeCache = require('node-cache');
const API_ENDPOINT = 'http://pokeapi.co/api/v2/pokemon/';
const cache = new NodeCache();
// accepts an endpoint (string) to query
// accepts a callback function to be called when the query is finished
function callEndpoint(endpoint, callback) {
request(endpoint, (error, response, body) => {
// if unsuccessful, pass the error to the callback function
// bootstrap overrides
$navbar-default-bg: $off-black;
$navbar-height: 70px;
$navbar-border-radius: 0;
$navbar-default-link-color: $white;
$navbar-default-link-hover-color: $concur-blue;
$navbar-default-link-active-color: $navbar-default-link-color;
// eliminate margin between navbar and page content
nav.navbar {