Skip to content

Instantly share code, notes, and snippets.

View 128keaton's full-sized avatar

Keaton Burleson 128keaton

View GitHub Profile
@128keaton
128keaton / printerface.rb
Created January 9, 2018 18:02
Talk to a Packsize printer with Ruby <3
#!/usr/bin/env ruby
# encoding: utf-8
require "rubygems"
require "bunny"
require "json"
def buildHash(width, height, length, orderNumber = "Mambo Test Print #9")
@128keaton
128keaton / chaching.py
Created December 8, 2017 02:50
DYN Coin Google Home notification
#!/usr/bin/python
import subprocess
import time
import json
import requests
EARL = 'http://10.0.0.145:5000/play/cha.m4a'
CMD = '~/dynamic-1.5.0/bin/dynamic-cli getwalletinfo'
BALANCE = -1.0
@128keaton
128keaton / install.sh
Last active November 3, 2017 03:16
Installs a branch of Tigerbrew
#!/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/mistydemeo/tigerbrew/tarball/master anywhere you like or
# change the value of HOMEBREW_PREFIX.
HOMEBREW_PREFIX = '/usr/local'
TIGERBREW_BRANCH = 'vendor_ruby'
module Tty extend self
def blue; bold 34; end
def white; bold 39; end
//
// SubmitHelper.swift
// Testà
//
// Created by Keaton Burleson on 10/30/17.
// Copyright © 2017 er2. All rights reserved.
//
import Foundation
import SystemServices
<?php
namespace TdatBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use TdatBundle\Entity\Category;
In the recent years, the marijuana legalization debate has taken American politics by storm. Two articles, with opposite view points, attempt to stake their claim in legalization territory. First Christian Science Monitor’s ‘Legalize Marijuana? No So Fast’, and second is Gary Johnson’s ‘Legalize Pot to Cut Crime, Fill Coffers’. Within this essay, both articles will be examined, and the arguments within deconstructed. Then, the related arguments will be compared. I will begin by stating that the argument presented in CSM’s article is stronger than the argument presented in Johnson’s essay.
Johnson’s article is littered with claims, but with no evidence behind them. The article also doesn't have a clear thesis statement, but instead One stunning example is the claim that “Marijuana is this country's largest cash crop, a $36 billion-a-year industry that is bigger than corn and wheat combined” (Cite). Johnson also claims that “America would be a better place to live if all the resources we currently put toward
class SampleImage extends React.Component {
render() {
let pic = {
uri: "http://lorempixel.com/" + this.props.width + "/" + this.props.height
};
let imageWidth = Number.parseInt(this.props.width, 10)
let imageHeight = Number.parseInt(this.props.height, 10)
return (<Image
source={pic}
style={{
@128keaton
128keaton / main.js
Created September 8, 2017 15:15
main.js from Yahoo! Weather Widget
const dayList = { "Sunday":"Sun", "Monday":"Mon", "Tuesday":"Tue", "Wednesday":"Wed", "Thursday":"Thu", "Friday":"Fri", "Saturday":"Sat" };
const conditionList = [ "Tornado", "Tropical Storm", "Hurricane", "Strong Thunderstorms", "Thunderstorms", "Rain and Snow", "Rain and Sleet", "Freezing Rain", "Freezing Drizzle", "Drizzle", "Freezing Rain", "Showers", "Rain", "Flurries", "Snow Showers", "Blowing Snow", "Snow", "Hail", "Sleet", "Dust", "Fog", "Haze", "Smoke", "Breezy", "Windy", "Frigid", "Cloudy", "Mostly Cloudy", "Mostly Cloudy", "Partly Cloudy", "Partly Cloudy", "Clear", "Sunny", "Mostly Clear", "Mostly Sunny", "Mixed Rain and Hail", "Hot", "Isolated Thunderstorms", "Scattered Thunderstorms", "Scattered Showers", "Heavy Rain", "Scattered Snow Showers", "Heavy Snow", "Blizzard", "No Feed", "Scattered Showers", "Scattered Snow Showers", "Scattered Thunderstorms" ];
const maxPopupTextWidth = 148;
const msFifteenMinutes = 900000;
const msOneHour = 3600000;
const temperatureExpiration = 1800000; // 30 minutes
@128keaton
128keaton / Apple-11-UIStyle.swift
Created July 2, 2017 04:23
A WIP iOS Class that mimics some of iOS 11's new UI for other things like buttons and switches.
import Foundation
import UIKit
// Written by Keaton Burleson
// 128keaton.com
// :D
class CentralMenuButton: UIButton {
var label: UILabel?
var labelText: String!

Keybase proof

I hereby claim:

  • I am 128keaton on github.
  • I am 128keaton (https://keybase.io/128keaton) on keybase.
  • I have a public key ASDvIM17Q3PR8scL6iKud2GlV2rEOH9EiGkp_WFl2cSm5go

To claim this, I am signing this object: