Skip to content

Instantly share code, notes, and snippets.

Tate Johnson tatey

Block or report user

Report or block tatey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tatey / 0_template.html
Created Jan 31, 2014
API I'd like to consume for uploading images to Cloudinary with AngularJS.
View 0_template.html
<div ng-controller="AvatarController">
<img ng-src="getImageUrl()" cloudinary open="imageDialogIsOpen" change="imageDidChange(url)">
<button ng-click="openImageDialog()">Change Avatar</button>
tatey / gist:8793377
Last active Aug 29, 2015
Export `foo` to `window`.
View gist:8793377
(function (global) {
'use strict';
var foo = function () {
return this;
if (global.namespace === undefined) {
global.namespace = {};
View 0_template.html.haml
%div{ng: {controller: 'planner.coverImageController', init: @plan.to_json}}
%img{ng: {src: 'getCoverImageUrl()'}}
// The cloudinary directive communicates with the cover image controller through `done`.
// When the fileuploaddone
%div{cloudinary: 'true', done: 'fileDidUpload(url)', timestamp: cloudinary_info.timestamp, corscallback: cloudinary_info.cors_callback, signature: cloudinary_info.signature, apikey: cloudinary_info.api_key}
View protractor.conf.js
exports.config = {
// The address of a running selenium server.
seleniumAddress: '',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome',
'browserstack.tunnel': 'true',
'browserstack.debug': 'true',
'browserstack.user' : process.env.BROWSERSTACK_USER,
View gist:10459627
#!/usr/bin/env ruby
# End to end tests.
# Starts the application server and BrowserStack tunnel in the background
# and then runs protractor. Stops the server and tunnel after protractor
# finishes.
require 'bundler/setup'
require 'dotenv'
app = angular.module 'dashboard'
app.animation '.appear', [->
addClass: (element, className, done) ->
$element = jQuery element
$element.removeClass className
$element.css 'opacity', 1
$element.animate {opacity: 0}, 300, 'linear', ->
$element.addClass className
tatey / Makefile
Created Oct 18, 2014
Simple alternative to gulp
View Makefile
BIN = ./node_modules/.bin
all: css js html
mkdir -p build/
$(BIN)/node-sass css/index.css.sass -o build/index.css
mkdir -p build/
tatey / gist:c5482ab8ea3ef24e6191
Created Jan 23, 2015
Ruby wrapper for public Nest API
View gist:c5482ab8ea3ef24e6191
require 'excon'
require 'json'
require 'uri'
module NestAPI
VERSION = '0.0.1'
class Default
def initialize(token)
@token = token
View compose_ring.rb
#!/usr/bin/env ruby
require 'pry'
require 'pathname'
if ARGV.count != 3
puts "usage: #{__FILE__} <TEMPLATE_IMAGE> <SOURCE_DIR> <DEST_DIR>"
View invert_rings.rb
#!/usr/bin/env ruby
require 'pry'
require 'pathname'
if ARGV.count != 3
puts "usage: #{__FILE__} <TEMPLATE_IMAGE> <SOURCE_DIR> <DEST_DIR>"
You can’t perform that action at this time.