This file contains hidden or 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
| desc "Remove trailing whitespace for source files" | |
| task :strip_whitespace do | |
| files = %w[ .autotest .rspec .rvmrc Gemfile ] | |
| globs = %w[ lib/**/*.rb spec/**/*.rb ] | |
| files_from_globs = globs.map { |glob| Dir[glob] } | |
| files_to_strip = (files + files_from_globs).flatten | |
| system "sed -e 's/[ \t]*$//' -i '' #{files_to_strip.join(" ")}" | |
| end |
This file contains hidden or 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 | |
| # | |
| # Removes trailing whitespace from all source files in the current directory and its children. | |
| # Note the `-i .bak` switch to sed. This will create a backup copy alongside any modified files | |
| # like `Somefile.cpp.bak` Simply remove the `.bak` argument to `-i` to prevent the backup | |
| # files from being generated | |
| # | |
| /usr/bin/find . -type f -and \( -name '*.m' -or -name '*.h' -or -name '*.mm' -or -name '*.cpp' -or -name '*.c' \) -and -print0 | xargs -0 sed -i .bak -E "s/[[:space:]]+$//" |
This file contains hidden or 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
| namespace :heroku do | |
| def app_name | |
| @app_name ||= Heroku::Command::BaseWithApp.new([]).app | |
| end | |
| def latest_bundle(timeout = 30) | |
| puts "Attempting to get latest bundle..." | |
| get_bundle = lambda do | |
| bundles = Heroku::Command.run('bundles', {}) | |
| bundles.sort { |b1, b2| b1[:created_at] <=> b2[:created_at] } |
This file contains hidden or 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 | |
| if [[ ! -n $1 ]]; then | |
| echo "Please insert a project name" | |
| exit 1 | |
| fi | |
| # Mysql Config | |
| MYSQL_USER="" |
This file contains hidden or 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 'rubygems' | |
| require 'net/http' | |
| require 'nokogiri' | |
| TUMBLR_USER = '[email protected]' | |
| TUMBLR_PASS = 'yourpassword' | |
| url = URI.parse('http://www.tumblr.com/api/write') | |
| # Read the WP export file |
This file contains hidden or 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 | |
| ## WP2TUMBLR: WordPress 2 Tumblr Importing tool | |
| ## | |
| ## Usage: wp2tumblr [OPTION] WORDPRESS_XML_FILE | |
| ## | |
| ## Import the WORDPRESS_XML_FILE to a Tumblr blog. | |
| ## Provide `--group` option to publish to a group. | |
| ## This could take a long time... | |
| ## | |
| ## To install, download the script and chmod to 755. |
NewerOlder