This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.
— Erik
// Playground - noun: a place where people can play | |
import Foundation | |
typealias Byte = UInt8 | |
protocol GenericIntegerType: IntegerType { | |
init(_ v: Int) | |
init(_ v: UInt) | |
init(_ v: Int8) |
#!/bin/bash | |
# Arguments can include a quoted string to define the test string to be repeated | |
# If an argument is numbers only, it changes the rate at which to speak (words per minute, default 200) | |
play_all_voices() { | |
local voice | |
local rate=200 | |
local test_string="How are you?" | |
for arg in $@; do | |
if [[ $arg =~ ^[0-9]+$ ]]; then |
var ReactInstanceMap = require("react/lib/ReactInstanceMap"); | |
var ReactLifeCycle = require("react/lib/ReactLifeCycle"); | |
var ReactNativeComponent = require("react/lib/ReactNativeComponent"); | |
var ReactReconciler = require("react/lib/ReactReconciler"); | |
var emptyObject = require("react/lib/emptyObject"); | |
var invariant = require("react/lib/invariant"); | |
var warning = require("react/lib/warning"); | |
var ReactCompositeComponentMixin = require('react/lib/ReactCompositeComponent').Mixin; |
import { Component } from "React"; | |
export var Enhance = ComposedComponent => class extends Component { | |
constructor() { | |
this.state = { data: null }; | |
} | |
componentDidMount() { | |
this.setState({ data: 'Hello' }); | |
} | |
render() { |
# --------------------------------------------------------------------------- | |
# | |
# Description: This file holds all my BASH configurations and aliases | |
# | |
# Sections: | |
# 1. Environment Configuration | |
# 2. Make Terminal Better (remapping defaults and adding functionality) | |
# 3. File and Folder Management | |
# 4. Searching | |
# 5. Process Management |
<!doctype html> | |
<!-- http://taylor.fausak.me/2015/01/27/ios-8-web-apps/ --> | |
<html> | |
<head> | |
<title>iOS 8 web app</title> | |
<!-- CONFIGURATION --> |
MKMapRect zoomRect = MKMapRectNull; | |
for (id <MKAnnotation> annotation in mapView.annotations) { | |
MKMapPoint annotationPoint = MKMapPointForCoordinate(annotation.coordinate); | |
MKMapRect pointRect = MKMapRectMake(annotationPoint.x, annotationPoint.y, 0, 0); | |
if (MKMapRectIsNull(zoomRect)) { | |
zoomRect = pointRect; | |
} else { | |
zoomRect = MKMapRectUnion(zoomRect, pointRect); | |
} | |
} |