Most basic example of authenticating with Github in node.
Clone this gist, change keys inside config.js
and then hit npm install && node app.js
.
#!/bin/bash | |
repos=( | |
"/Users/rob/Library/Application Support/TextMate/Bundles/Git.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/RubyAMP.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby Haml.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/Ruby on Rails.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/ruby-sass.tmbundle" | |
"/Users/rob/Library/Application Support/TextMate/Bundles/ruby-shoulda.tmbundle" |
// NOTE: I added the .js extension to this gist so it would have syntax highlighting. This file should have NO file extension | |
{ | |
// Settings | |
"passfail" : false, // Stop on first error. | |
"maxerr" : 100, // Maximum error before stopping. | |
// Predefined globals whom JSHint will ignore. | |
"browser" : true, // Standard browser globals e.g. `window`, `document`. |
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
const Application = ((d) => { | |
const privateVariable = 'Private content' | |
const __private = { | |
cache: () => { | |
this.link = d.querySelector('.link') | |
}, | |
bind: () => { | |
this.link.addEventListener('click', this.showContent, false) |
<?php | |
/** | |
* Setup wp_query arguments for the loop. Cache the results for 4 hours. | |
* | |
* @link http://codex.wordpress.org/Transients_API | |
*/ | |
// Check for transient | |
if ( false === ( $my_query = get_transient( 'foo_featured_posts' ) ) ) { | |
// Determine if an element is in the visible viewport | |
function isInViewport(element) { | |
var rect = element.getBoundingClientRect(); | |
var html = document.documentElement; | |
return ( | |
rect.top >= 0 && | |
rect.left >= 0 && | |
rect.bottom <= (window.innerHeight || html.clientHeight) && | |
rect.right <= (window.innerWidth || html.clientWidth) | |
); |
# ----------------------------------------------------------------- | |
# .gitignore for WordPress | |
# Bare Minimum Git | |
# http://ironco.de/bare-minimum-git/ | |
# ver 20150227 | |
# | |
# This file is tailored for a WordPress project | |
# using the default directory structure | |
# | |
# This file specifies intentionally untracked files to ignore |
{ | |
"name": "my-app", | |
"version": "1.0.0", | |
"description": "My test app", | |
"main": "src/js/index.js", | |
"scripts": { | |
"jshint:dist": "jshint src/js/*.js", | |
"jshint": "npm run jshint:dist", | |
"jscs": "jscs src/*.js", | |
"browserify": "browserify -s Validating -o ./dist/js/build.js ./lib/index.js", |