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
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
#!/bin/bash | |
set -e | |
cd "$(dirname $0)/.." | |
DIST_PATH=dist | |
APP_NAME=Toolbelt | |
APP_PATH="$DIST_PATH/$APP_NAME.app" | |
BACKGROUND_PNG=app/assets/install.tiff |
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
# Assume my-file.txt has been commited previously | |
repo = Rugged::Repository.discover(some_dir) | |
File.delete("my-file.txt") | |
# This will stage the file deletion | |
repo.index.remove("my-file.txt") # This doesn't work | |
repo.index.write | |
# How do I "unstage" this deletion? | |
repo.index.add("my-file.txt") # This doesn't work... what will? |
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
var git = require('nodegit'); | |
var repo = null; | |
var repoPath = process.argv[2] | |
if(!repoPath) { | |
console.log("Usage: node nodegit-bug.js PATH_GIT_REPO") | |
process.exit(1) | |
} | |
git.Repository.open(repoPath) |
NewerOlder