Skip to content

Instantly share code, notes, and snippets.

Avatar

Tate Johnson tatey

View GitHub Profile
View test.markdown

<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAT8AAAEVCAYAAACWkeL7AAAWdWlDQ1BJQ0MgUHJvZmlsZQAAWIWVmAdUFN2SgG/3JBhmSEPOQxhyzjknyVkQgWHIOScDiIoKSpIkoAIqQRSUJIJKMIBIFBEUUYKICCqKCILKjv4r7nt7dvdsndPTX1ffrq7putV1qwHg6CVHRITAjACEhsVE2ZsaCOx2dRPATAMIoAAGqAOYTImO0Le1tQRU+bP/V/n6lDqaKqPSv2z99/P/qzD5+EZTAIBsqeztE00JpXITdeunRETFAIBIoeqF4mMifvFFKrNEUR2kcusv9v+H+3+x9z88/XuMo70hlb8AQIMjk6P8AcD9updAHMWfagcnAACaOcwnMAwAZiUq61ACyD4AcFDPAanQ0PBfXEZlMe//Ysf/X2x679gkk/13+J//8ltojAKjI0LIif/Px/F/S2hI7J97CFI3XECUmT11L0x9ZtXB4RY7HOZtbfOHA31+j//NAbFmTn+YEm3o9od9yEYWfzg22En/D5Oj/l4bGGPu+Iejwu137IeFWFvu2Pc132HfaGOHP+wXaGL+h5MCHF3+cFygs/Ufjg52sPg7xnBHHxVrv+OzX5TJzn8Mjf7rG4X8914xAY5mf33YveOPj6+R8Y4+zGlnfESMwY7NiBDbv/6HmO7oo+Mcdq6NoU6wPxxE3mX7147tzvMBlsAYGAEBYAgCQRjwBaGATD0yoh5FgwgQQj1KjPFN+DXngGF4RGJUoH9AjIA+NYN8BczDKDJSAgpy8ioA/MrHf8K9av87zyC2ob+6SOr1GuoAwGf/6siSALRJUdPgyl+dMNUSXQkA7XOU2Ki4f3TIXz8ogAUMgAVwAj4gBMSANFAAKkAT6FG93wVsgCNwBR6AAgKo/keBeLAfHAJpIANkg3xQDM6DC6AaXAUN4Aa4BbrAA/AIDIMxMAmmwTxYAivgK9iCIAgD4SECxAnxQyKQJKQAqUE6

@tatey
tatey / es_index_conflict_mapping
Last active Jan 28, 2016
Identify conflicting field mappings in ElasticSearch 1.x > 2.0 upgrade
View es_index_conflict_mapping
#!/usr/bin/env ruby
require 'json'
if ARGV.size < 1
puts "usage: #{__FILE__} <FILE1> [FILE2 ...]"
puts " eg: ./es_index_conflict_mapping applogs-2016.01.10.json applogs-2016.01.13.json applogs-2016.01.08.json applogs-2016.01.11.json applogs-2016.01.27.json"
abort
end
View hklifxd.sh
#!/bin/sh
### BEGIN INIT INFO
# Provides: hklifxd
# Required-Start: $local_fs $network
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: hklifxd initscript
# Description: HomeKit bridge for LIFX lights
View style.swift
import UIKit
class Style {
static let tableCellInset: CGFloat = 15.0
}
class StyleColor {
static let primaryBackgroundColor = UIColor.blackColor()
static let primaryTextColor = UIColor.whiteColor()
static let secondaryTextColor = UIColor(red: 0.45, green: 0.45, blue: 0.45, alpha: 1)
View 0_type.cr
enum Type : UInt16
DeviceGetService = 2
DeviceStateService
DeviceGetPower = 20
DeviceSetPower
DeviceStatePower
def c_struct
{% if true %}
case self
View gist:b7fe5a95eba5cbf47757
in macro 'macro_4595589792' /Users/Tate/Desktop/lifx-crystal/src/lifx/message/type.cr:11, line 5:
1.
2. case self
3.
4. when DeviceGetService
5. C::LXDeviceGetService
6.
7. when DeviceStateService
8. C::LXDeviceStateService
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>"
exit(1)
end
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>"
exit(1)
end
@tatey
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
@tatey
tatey / Makefile
Created Oct 18, 2014
Simple alternative to gulp
View Makefile
BIN = ./node_modules/.bin
all: css js html
css:
mkdir -p build/
$(BIN)/node-sass css/index.css.sass -o build/index.css
js:
mkdir -p build/
You can’t perform that action at this time.