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
# Bower configuration | |
# | |
# Official docs at: http://bower.io/docs/config/ | |
# Last updated at: 2014-08-14 | |
# | |
# Config is obtained by merging the following, in given order: | |
# - CLI args via -config | |
# - Environment variables | |
# - Local .bowerrc located in the current working directory | |
# - All .bowerrc files upwards the directory tree |
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
# Nuke Ruby! | |
rm -rf ~/.gem | |
rm -rf ~/.rubies | |
# Prerequisites for Mac OSX installation | |
# | |
# Make sure Xcode or the command line tools are installed | |
# This one's up to you: https://github.com/kennethreitz/osx-gcc-installer#readme | |
# | |
# Install Homebrew if not installed |
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
# | |
# FUNCTIONS | |
# | |
# Test the first argument of a command for a git host identifier (aliases configured in ssh-config) | |
is_git_host() { | |
case "$1" in | |
'gh') host='github-personal' | |
user='SteveBenner' | |
true ;; |
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 fname_incr(fname) | |
!File.exists?(fname) ? | |
fname : | |
/([0-9]+)\./.match(fname) ? | |
fname_incr(fname.sub(/([0-9]+)/) { |m| (m.to_i+1).to_s }) : | |
fname_incr(fname.sub(/[^\.]*/) { |m| m+'1' }) | |
end |
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 | |
# | |
# CLI tool for locating and removing a Homebrew installation | |
# http://brew.sh/ | |
# | |
# Copyright (C) 2014 Stephen C. Benner | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or |
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 | |
# | |
# Shortcuttr - generates executable shortcuts | |
# | |
require 'fileutils' | |
SCRIPT = File.join ENV['HOME'], 'github/ruby-scripts/system/bin', ARGV.first.to_s | |
File.open SCRIPT, 'w', 0755 do |f| | |
f.puts '#!/usr/bin/bash' | |
f.puts '# This executable shortcut was generated by Stephen Benner, a truly lazy programmer' |
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 | |
# | |
# Homebrew fix 1 - osxfuse dylibs | |
# | |
# original solutions: https://gist.github.com/aaronzirbes/3239033 | |
# https://gist.github.com/trinitronx/5437061 | |
# | |
# Fixes the following: | |
# | |
# > Warning: Unbrewed dylibs were found in /usr/local/lib. |
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 'bundler' | |
require 'fileutils' | |
Bundler.require | |
GHOST_DIR = ENV['GHOST_HOME'] || '<your_ghost_folder>' | |
THEME = 'casper' | |
namespace :blog do | |
desc 'Upgrades Ghost using given file' |
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
/ Integrate Disqus comments into your site with this widget (adheres to official API and config spec) | |
/ | |
/ @see https://help.disqus.com/customer/portal/articles/1104788-web-integration Official web integration docs | |
/ @see https://help.disqus.com/customer/portal/articles/472098-javascript-configuration-variables Configuration docs | |
/ | |
/ @local [Hash{Symbol => String}] disqus Key/value pairs corresponding to the Disqus JS configuration variables | |
/ @option disqus [String] shortname Unique identifier for your forum website registered on Disqus.com (REQUIRED) | |
/ @option disqus [String] identifier A String or Integer value which identifies the current web page thread | |
/ @option disqus [String] title Title of the current page; defaults to value of HTML `title` element | |
/ @option disqus [String] url URL of the current page; defaults to `window.location.href` |
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
// Github markdown styles | |
$h1-grey: #dddddd | |
$h2-grey: #eeeeee | |
$header-black: #333333 | |
// placeholders | |
%hover-link | |
background: url(data:image/png) no-repeat 10px center | |
text-decoration: none |