- No icons bouncing in the Dock
$ defaults write com.apple.dock no-bouncing -bool TRUE $ killall Dock
- Change the screenshot save file location
$ defaults write com.apple.screencapture location /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
require 'minitest/autorun' | |
require 'rack/test' | |
require 'active_record' | |
require 'logger' | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory') | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
ActiveRecord::Schema.define do | |
create_table :tickets, force: true do |t| |
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
Driver Caps: | |
Driver: "omap3" | |
Card: "omap3/mt9v032//" | |
Bus: "" | |
Version: 0.0 | |
Capabilities: 04000001 | |
Camera Cropping: | |
Bounds: 752x480+0+0 | |
Default: 752x480+0+0 | |
Aspect: 1/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
module GitJson | |
extend self | |
DEFAULT_TEMPLATE = { | |
hash: '%H', | |
commit: '%s', | |
date: '%at' | |
} | |
def self.log(from_commit: '', to_commit: '', n: 0, template: DEFAULT_TEMPLATE) |
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
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction |
There is a long standing issue in Ruby where the net/http library by default does not check the validity of an SSL certificate during a TLS handshake. Rather than deal with the underlying problem (a missing certificate authority, a self-signed certificate, etc.) one tends to see bad hacks everywhere. This can lead to problems down the road.
From what I can see the OpenSSL library that Rails Installer delivers has no certificate authorities defined. So, let's go fetch some from the curl website. And since this is for ruby, why don't we download and install the file with a ruby script?
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
module Serel | |
class Question | |
def self.search_advanced | |
url("search/advanced") | |
end | |
end | |
class Relation | |
%w(q).each do |meth| | |
class_eval <<-RUBY, __FILE__, __LINE__ + 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
class StackexchangePlugin | |
include Cinch::Plugin | |
API_KEY = '<empty>' | |
SITES = %w(stackoverflow serverfault) | |
SITES.each do |site| | |
match /#{site} (.+)/, method: site.to_sym | |
class_eval %{ | |
def #{site}(m,search_string) |