Skip to content

Instantly share code, notes, and snippets.

View grandadmiral-thrawn's full-sized avatar

Fox Peterson grandadmiral-thrawn

  • Hire me?
  • Vancouver, wa
View GitHub Profile
@grandadmiral-thrawn
grandadmiral-thrawn / ViewController.swift
Created December 23, 2016 21:29
View Controller part 2, Ray-Wenderlich-ios. IBOutlet weak var for UISlider instantiated with Int var for its value
import UIKit
class ViewController: UIViewController {
var currentValue: Int = 50
@IBOutlet weak var slider: UISlider!
override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
@grandadmiral-thrawn
grandadmiral-thrawn / ViewController.swift
Created December 23, 2016 20:01
Ray-Wenderlich-ios-course: callback on a button that triggers alert.
//
// ViewController.swift
// Project Name
//
// Created by Fox Peterson on 12/22/16.
// Copyright © 2016 KoalaStream. All rights reserved.
//
import UIKit
@grandadmiral-thrawn
grandadmiral-thrawn / eloquentUtils.js
Last active September 29, 2016 23:12
Waypoints Only Pathfinding by Fox
//Utility Functions to make JS more Functional
var op = {
"+": function(a, b){return a + b;},
"==": function(a, b){return a == b;},
"===": function(a, b){return a === b;},
"!": function(a){return !a;}
};
var asArray = function(quasiArray, start) {
var result = [];
@grandadmiral-thrawn
grandadmiral-thrawn / jsbin.burut.html
Created August 20, 2016 17:55 — forked from mojaray2k/jsbin.burut.html
CSS only custom-styled select Todd Parker - Filament Group Inc. How this works: This styles a native select consistently cross-platform with only minimal CSS. The native select is then styled so it is essentially invisible (no appearance, border, bg) leaving only the select's text visible. There is a wrapper around the select that has the majori…
<html>
<head>
<title>Select styles with CSS only</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
background-color: #fff;
font-family: helvetica, sans-serif;
margin: 4% 10%
}
@grandadmiral-thrawn
grandadmiral-thrawn / index.html
Created July 28, 2016 16:32
Transforming one SVG shape to another
<p> Used embedded information to transform SVG shape between two paths, and carry a set of rects with it</p>
<div style="display: flex; flex-flow: row wrap; justify-content: space-around; max-width: 1000px">
<div style="width:200px; height:200px; margin: 10px;">
<svg xmlns="http://www.w3.org/2000/svg" id="svg-1" xmlns:xlink="http://www.w3.org/1999/xlink" x="0" y="0" width="1000" height="1000" viewBox="0 0 1000 1000">
<defs>
<pattern patternContentUnits="userSpaceOnUse" width="100%" height="100%" id="pattern1">
<rect x="260" y="260" width="10" height="10" fill-opacity="1" fill="blue" stroke="#F06D06" stroke-width="2" />
<rect x="280" y="300" width="10" height="10" fill-opacity="1" fill="blue" stroke="#F06D06" stroke-width="2" />
<rect x="350" y="300" width="10" height="10" fill-opacity="1" fill="blue" stroke="#F06D06" stroke-width="2" />
<rect x="370" y="380" width="10" height="10" fill-opacity="1" fill="blue" stroke="#F06D06" stroke-width="2" />
<div class="test">
<svg id="testsvg" width="960" height="540" viewbox = "0 0 1920 1080" stroke="red" stroke-opacity="1" stroke-width="1">
<defs>
<linearGradient id="grad2" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:rgb(255,255,0);stop-opacity:1" />
<stop offset="100%" style="stop-color:rgb(255,0,0);stop-opacity:1" />
</linearGradient>
<linearGradient id="grad3" x1="0%" y1="0%" x2="0%" y2="100%">
<stop offset="0%" style="stop-color:#CC0000;stop-opacity:1" />
<stop offset="100%" style="stop-color:#FF6387;stop-opacity:1" />
@grandadmiral-thrawn
grandadmiral-thrawn / index.html
Created January 30, 2016 17:49
test for css for enlighted thing
<div id="simple">Simple illustration of 2014 earthquake nodes</div>
<div id="map"></div>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<div id="epitoconcord"></div>
<div id="spacing" style="padding-top:50px"> </div>
<div id="epitofairfield"></div>
<div id="spacing" style="padding-top:50px"> </div>
<div id="analytic"></div>
@grandadmiral-thrawn
grandadmiral-thrawn / Custom CSS styles and animations in Google Maps markers.markdown
Created January 17, 2016 16:32
Custom CSS styles and animations in Google Maps markers
@grandadmiral-thrawn
grandadmiral-thrawn / launch.py
Created January 10, 2016 23:31
Creates a localhost server, index.html, and objects for writing to it. Lightweight, minimal.
import http.server
import os
import webbrowser
class Server(object):
""" serves http on port 5200"""
def __init__(self):
self.page = ""
pass