Tables | Are | Cool |
---|---|---|
col 1 is | left-aligned | $1600 |
col 2 is | centered | $12 |
col 3 is | right-aligned | $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env coffee --nodejs --harmony | |
fs = require 'fs' | |
MB = 1048576 | |
[ignore, ignore, filePath, megabytes] = process.argv | |
fileSize = 0 | |
words = fs.readFileSync('/usr/share/dict/words').toString().split("\n") | |
ws = fs.createWriteStream(filePath) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
carthage update --no-use-binaries --no-build | |
*** Fetching PINOperation | |
*** Checking out PINCache at "3.0.1-beta.8" | |
*** Checking out PINOperation at "1.1.2" | |
carthage build --no-skip-current | |
*** xcodebuild output can be found in /var/folders/6h/ql1brcjx3936vr5vwgblbnc80000rm/T/carthage-xcodebuild.tCygxC.log | |
*** Downloading PINOperation.framework binary at "Modernize PINOperation" | |
*** Downloading PINCache.framework binary at "Modernization" | |
*** Building scheme "PINRemoteImage-tvOS" in PINRemoteImage.xcodeproj | |
*** Building scheme "PINRemoteImage" in PINRemoteImage.xcodeproj |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this to your .bashrc or .zshrc file for a modern and sophisticated | |
# alternative to `man`. | |
function woman() { | |
man -t $1 | open -f -a /Applications/Preview.app | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def parse_date_range(options) | |
from = Time.zone.parse(options[:from]) rescue ArgumentError | |
to = Time.zone.parse(options[:to]) rescue ArgumentError | |
to ||= from.try?(:next_day) || Date.current | |
from ||= to.begining_of_month | |
time_range = from..to | |
days_in_range = (to - from).to_i | |
to = from + MAX_DAY_RANGE.days if days_in_range > MAX_DAY_RANGE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
BRANCH=$(git branch | sed -n '/\* /s///p') | |
git branch --set-upstream-to=origin/$BRANCH $BRANCH |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shift still doesn't work | |
window.keydown = (key, {ctrl, shift, alt, meta}) -> | |
dispatchKeyboardEvent = (target, eventArgs...) -> | |
e = document.createEvent("KeyboardEvent") | |
e.initKeyboardEvent eventArgs... | |
target.dispatchEvent e | |
dispatchTextEvent = (target, eventArgs...) -> | |
e = document.createEvent("TextEvent") | |
e.initTextEvent eventArgs... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<title>PeerJS Issue</title> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<meta http-equiv="Content-Language" content="en-us"> | |
<script type="text/javascript" src="http://cdn.peerjs.com/0/peer.js"></script> | |
<script type="text/javascript" src="http://coffeescript.org/extras/coffee-script.js"></script> | |
<script type="text/coffeescript"> | |
window.host = -> |
NewerOlder