Skip to content

Instantly share code, notes, and snippets.

View shrunyan's full-sized avatar

Stuart Runyan shrunyan

View GitHub Profile
@shrunyan
shrunyan / index.js
Created May 14, 2016 20:11 — forked from anonymous/index.js
Experimenting with Koajs and the Spotify api
'use strict'
const koa = require('koa')
const r = require('koa-route')
const https = require('https')
const app = koa()
app.use(r.get('/search/:term', function *(term) {
const req = https.request({
method: 'get',
@shrunyan
shrunyan / block-filter.css
Last active August 29, 2015 14:26 — forked from aarongustafson/block-filter.css
@supports IE TestDrive Code Samples
b {
background-color: red;
}
@media only screen {
b {
background-color: green;
}
b[class] {
background: linear-gradient( 0deg, rgb(65, 150, 44), rgb(26, 219, 73) );
@shrunyan
shrunyan / index.html
Last active August 29, 2015 14:26 — forked from benjchristensen/index.html
Simple Sparkline using SVG Path and d3.js
<html>
<head>
<title>Simple Sparkline using SVG Path and d3.js</title>
<script src="http://mbostock.github.com/d3/d3.v2.js"></script>
<style>
/* tell the SVG path to be a thin blue line without any area fill */
path {
stroke: steelblue;
stroke-width: 1;
fill: none;
@shrunyan
shrunyan / gulpfile.js
Last active August 29, 2015 14:25 — forked from danharper/gulpfile.js
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@shrunyan
shrunyan / README.md
Last active August 29, 2015 14:23 — forked from jonathantneal/README.md

Local SSL websites on Mac OSX

These instructions will guide you through the process of setting up local, trusted websites on your own computer.

These instructions are intended to be used on Mac OSX Yosemite.

NOTE: You may substitute the edit command for nano, vim, or whatever the editor of your choice is. Personally, I forward edit to Sublime Text:

alias edit="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@shrunyan
shrunyan / Gruntfile.js
Last active August 29, 2015 14:07 — forked from ginpei/Gruntfile.js
// ./Gruntfile.js
module.exports = function(grunt) {
grunt.loadTasks('hoge');
};
function eachAsync(collection, iterator, callback) {
var iterate = function(i) {
setTimeout(function() {
iterator(collection[i]);
if (i < collection.length) {
iterate(i + 1);
} else {
callback();
}
}, 0);
@shrunyan
shrunyan / iphone-splash-screen.html
Last active December 19, 2015 12:28 — forked from burin/gist:3840737
Adds a splash screen to an iPhone web app.
<!-- standard viewport tag to set the viewport to the device's width
, Android 2.3 devices need this so 100% width works properly and
doesn't allow children to blow up the viewport width-->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" />
<!-- width=device-width causes the iPhone 5 to letterbox the app, so
we want to exclude it for iPhone 5 to allow full screen apps -->
<meta name="viewport" id="vp" content="initial-scale=1.0,user-scalable=no,maximum-scale=1" media="(device-height: 568px)" />
<!-- provide the splash screens for iPhone 5 and previous -->
<link href="assets/splashs/splash_1096.png" rel="apple-touch-startup-image" media="(device-height: 568px)">
<link href="assets/splashs/splash_iphone_2x.png" rel="apple-touch-startup-image" sizes="640x960" media="(device-height: 480px)">
# custom login link
RewriteRule ^login$ http://localhost/whitelabel/wp-login.php [NC,L]