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 | |
# Based on https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
############################################################################### | |
# General UI/UX # | |
############################################################################### | |
# Set computer name (as done via System Preferences → Sharing) | |
scutil --set ComputerName "Edson Alves Junior's MacBook Pro" | |
scutil --set HostName "Edson Alves Junior's MacBook Pro" |
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 'rubygems' | |
require 'rbvmomi' | |
require 'pp' | |
require 'alchemist' | |
hyper = 'thunder03' | |
vim = RbVmomi::VIM.connect :host => hyper, :user => 'root', :password => 'secret', :insecure => true | |
# | |
# get current time |
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
# HAProxy configuration - haproxy-db.cfg | |
## | |
## FRONTEND ## | |
## | |
# Load-balanced IPs for DB writes and reads | |
# | |
frontend db_write | |
bind 172.16.0.50:3306 |
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 -wKU | |
# Adapted from Brett Terpstra’s original “Markdown to Evernote” service (http://brettterpstra.com/a-better-os-x-system-service-for-evernote-notes-with-multimarkdown/) | |
# Martin Kopischke 2011 – License: Creative Commons Attribution Share-Alike (CC BY-SA) 3.0 Unported (http://creativecommons.org/licenses/by-sa/3.0/) | |
# Changes: – create only one Evernote note per (Multi)Markdown input passed (instead of one per line) | |
# – do not choke on shell escape characters (use Tempfile instead of shell pipe for osascript) | |
# – default to MultiMarkdown 3 executable (instead of MMD 2 Perl script) | |
# – make smart typography processing optional (set SMARTY to 'false' to bypass processing; | |
# note smart typography cannot be disabled in MMD 3.0 and 3.0.1 | |
# – handle both smart typography processing scripts (ie. SmartyPants.pl) |
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
# capistrano deployment | |
require "bundler/capistrano" | |
require "capistrano/ext/multistage" | |
set :stages, %w(canary production) | |
set :default_stage, "canary" | |
set :application, "lolcats" | |
set :deploy_to, "/srv/#{application}" |
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
# subdomains.rake in /lib/tasks | |
namespace :subdomains do | |
desc "adds the necessary hosts to your /etc/hosts file from current subdomains in your application" | |
task :setup => :environment do | |
# NOTE: default_hosts is used as a locator for the line to update in /etc/hosts | |
tmp_file, changed = '/tmp/etc_hosts_copy', false | |
default_hosts, hosts = %w(blog.local emptyblog.blog.local), [] | |
# find all the subdomains used in your app (push to hosts array) - modify this to suit your 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
# ~/.irbrc | |
# Requires the following gems: wirble, hirb | |
# | |
# Hirb: http://tagaholic.me/hirb/doc/index.html | |
# Wirble: http://pablotron.org/software/wirble/ | |
require 'irb/completion' | |
require 'irb/ext/save-history' | |
IRB.conf[:SAVE_HISTORY] = 100 |