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 parse_git_dirty function. | |
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*" | |
} | |
# Replace your parse_git_branch function with this one. | |
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
function octo_new { | |
cwd=$(pwd) #save pwd as cwd | |
cd /Users/$USER/Documents/code/sts10.github.io | |
echo "Creating new octopress post called \""$1"\"" | |
rake new_post["$1"] | |
cd source/_posts | |
FILENAME=`ls -t | head -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
# Full github repo here: https://github.com/sts10/ink | |
function octo_new { | |
cwd=$(pwd) #save pwd as cwd | |
cd /Users/$USER/Documents/code/sts10.github.io | |
rake new_post["$1"] | |
echo "Creating new octopress post called \""$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
function octo_new { | |
cwd=$(pwd) #save pwd as cwd | |
cd /Users/$USER/Documents/code/sts10.github.io | |
if [[ $* == drafts ]] | |
then | |
git checkout drafts | |
ls source/_posts | |
echo '' | |
echo "Which file from your draft folder would you like to edit? Please enter the file's full name." |
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
function jot { | |
MAP="/Users/samschlinkert/Documents/code/jot/path.txt" | |
JOT_ROUTE=$(<$MAP) | |
if [[ $1 == here ]] | |
then | |
NEW_PATH=$(pwd) | |
echo "$NEW_PATH/" > $MAP | |
echo "Now jotting in "$NEW_PATH |
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
// Neccessary packages: | |
// Package Control, obviously https://sublime.wbond.net/ | |
// Sass and CoffeeScript syntax highlighting https://sublime.wbond.net/packages/Sass | |
// https://sublime.wbond.net/packages/CoffeeScript | |
// Expand Selection to Quotes https://sublime.wbond.net/packages/Expand%20Selection%20to%20Quotes | |
// SublimeERB https://sublime.wbond.net/packages/SublimeERB | |
// (Could try ERB Autocomplete https://sublime.wbond.net/packages/ERB%20Autocomplete) | |
// One of the Markdown packages | |
[ | |
{ "keys": ["alt+s"], "command": "toggle_side_bar" }, |
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 PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<title>{Title}</title> | |
<META NAME="Title" CONTENT="{Title}"> | |
{block:Description} | |
<META NAME="Description" CONTENT="{MetaDescription}"> |
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
require 'twitter_ebooks' | |
# This is an example bot definition with event handlers commented out | |
# You can define and instantiate as many bots as you like | |
class MyBot < Ebooks::Bot | |
# Configuration here applies to all MyBots | |
attr_accessor :original, :model, :model_path | |
def configure |
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
require "sinatra" | |
require "instagram" | |
enable :sessions | |
CALLBACK_URL = "http://localhost:4567/oauth/callback" | |
Instagram.configure do |config| | |
config.client_id = "CLIENT_ID_THAT_YOU_HAVE_TO_GIVE_YOUR_PHONE_NUMBER_TO_GET_BUT_AFTER_THAT_IT_WAS_BASICALLY_INSTANT" | |
config.client_secret = "CLIENT_SECRET" |
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
# Makes array of dates where (day + month + last_two_digits_of_year) and number of days since Jan 1, 1970 have both been prime since Jan 1, 1970 | |
require 'prime' | |
require 'date' | |
def date_to_sum(date) | |
date.month + date.day + date.year.to_s[2..-1].to_i | |
end | |
date_to_go_up_to = Date.parse("2017-01-01") |
OlderNewer