Skip to content

Instantly share code, notes, and snippets.

View taylorzane's full-sized avatar
🙂

Taylor Zane Glaeser taylorzane

🙂
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@taylorzane
taylorzane / alert.js
Created November 23, 2016 22:09
alert.js
alert(1)
const router = {
map (stuff) {
console.log(JSON.stringify(stuff))
}
}
const ComponentA = {
mixins: [{}]
}
const ComponentB = {
mixins: []
-- NOTE: This SQLite3 DB is located at /Users/you/Library/Messages/chat.db
-- NOTE: You can get your chat_id from the chat table.
select ROWID from chat where display_name="Display Name"
-- OR
select ROWID from chat where guid like "%SOME_PHONE_NUMBER%"
@taylorzane
taylorzane / onePersonStarred.rb
Last active January 29, 2016 19:26
Gives you a list of all starred "One Person Projects" for a particular user. (Projects that only have one contributor.)
#!/usr/bin/env ruby
require 'json'
require 'net/http'
USERNAME = 'YOUR_USERNAME'
# ACCESS_TOKEN is not required but Github is pretty swift to rate-limit.
# The access token doesn't have to have access to anything. It just removes the rate-limit.
# Obviously if you have a private starred repo, it will not show up in your list without
# a properly authenticated access token.
@taylorzane
taylorzane / exampleSpec.coffee
Created January 27, 2016 19:28
Vue.js Test Suite with Mocha + Chai + Sinon + Webpack
chai = require 'chai'
sinon = require 'sinon'
sinonChai = require 'sinon-chai'
expect = chai.expect
chai.use sinonChai
Async = require 'async'
vm =

Keybase proof

I hereby claim:

  • I am taylorzane on github.
  • I am taylorzane (https://keybase.io/taylorzane) on keybase.
  • I have a public key whose fingerprint is C61E F594 7552 42D6 F3F9 FD07 2047 A21E FA98 F8FB

To claim this, I am signing this object:

@taylorzane
taylorzane / index.js
Last active August 29, 2015 14:27
requirebin sketch
// require() some stuff from npm (like you were using browserify)
// and then hit Run Code to run it on the right
var Vue = require('vue');
var VueResource = require('vue-resource');
Vue.use(VueResource);
Vue.component('main', {
template: '<h1>Some Data</h1>'
@taylorzane
taylorzane / toggleGhPages.js
Created July 19, 2015 20:46
Toggle Github Repo and Github Pages
function() {
var loc = document.location;
if (loc.host.split('.').slice(-2).join('.') === 'github.io') {
loc.href = 'http://github.com/' + loc.host.split('.')[0] + '/' + loc.pathname.split('/').filter(function(e){return e !== '';})[0];
} else if (loc.host.split('.').slice(-2).join('.') === 'github.com') {
loc.href = 'http://' + loc.pathname.split('/').filter(function(e){return e !== '';})[0] + '.github.io/' + loc.pathname.split('/').filter(function(e){return e !== '';})[1];
} else {
console.log('whatever.');
}
}
@taylorzane
taylorzane / mithrilSnapSvgSliders.coffee
Created May 27, 2015 04:57
Mithril + Snap.svg Sliders
# Simple Slider for use with Mithril,
# and written with Snap.svg
# Written by: Taylor Zane Glaeser
#
# Disclaimer: Code is very crufty. I have no plans of updating this.
# cont: This is being posted as preservation of a direction
# cont: I decided to abandon.
# cont: SVGs were _WAY_ too laggy for 20+ elements.
#
# This code was wrapped in a for loop,