Skip to content

Instantly share code, notes, and snippets.

View 128keaton's full-sized avatar

Keaton Burleson 128keaton

View GitHub Profile
//
// AnimatedSelectionView.swift
//
// Created by Keaton Burleson on 4/12/17.
// Copyright © 2017 Keaton Burleson. All rights reserved.
//
import Foundation
import UIKit
import QuartzCore
//
// DeepPressGestureRecognizer.swift
// DeepPressGestureRecognizer
//
// Created by SIMON_NON_ADMIN on 03/10/2015.
// Copyright © 2015 Simon Gladman. All rights reserved.
//
// Thanks to Alaric Cole - bridging header replaced by proper import :)
import AudioToolbox
@128keaton
128keaton / dart.playground
Last active April 26, 2017 17:51
Calculating Pi with a Dartboard
import UIKit
import PlaygroundSupport
import SpriteKit
/*: pidarts.playground
# Calculating Pi with a Dart Board
____________
## a.k.a. "Monte Carlo algorithm"
To calculate pi for a circle inside of a square, we throw darts at the square and tally up the ones in the circle and tally up the ones outside of the circle separately.
____________

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:

@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!
@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
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={{
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
<?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;
//
// SubmitHelper.swift
// Testà
//
// Created by Keaton Burleson on 10/30/17.
// Copyright © 2017 er2. All rights reserved.
//
import Foundation
import SystemServices