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
# example: cpf c0fbe4 path/to/file.txt | |
function cpf() { | |
git diff -R $1 $2 | git apply | |
} |
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 | |
git checkout --orphan null | |
git rm --cached -r . | |
git commit --allow-empty -m 'null' | |
git push origin null |
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 ruby | |
require 'bundler/inline' | |
gemfile "https://rubygems.org" do | |
gem 'icalendar', '2.4.1' | |
gem 'sqlite3', '1.3.13' | |
end | |
db = SQLite3::Database.new File.join(ENV['HOME'], ".time-tracker.db") |
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 | |
DURATION=${1:-1800} | |
START=$(date "+%Y-%m-%d %H:%M:%S.000") | |
START_SECONDS=$(date "+%s") | |
UNTIL=$(gdate "+%I:%M%p" --date "+ $DURATION seconds") |