Change Apple OS X Dock size from Apple Terminal
defaults write com.apple.dock tilesize -int 32; killall Dock
32
is icon size
Change Apple OS X Dock size from Apple Terminal
defaults write com.apple.dock tilesize -int 32; killall Dock
32
is icon size
#!/bin/bash | |
# on system boot, and root have no rbenv installed, | |
# after start-stop-daemon switched to current user, we have to init rbenv | |
if [ -d "$HOME/.rbenv/bin" ]; then | |
PATH="$HOME/.rbenv/bin:$HOME/.rbenv/shims:$PATH" | |
eval "$(rbenv init -)" | |
elif [ -d "/usr/local/rbenv/bin" ]; then | |
PATH="/usr/local/rbenv/bin:/usr/local/rbenv/shims:$PATH" | |
eval "$(rbenv init -)" |
#! /bin/sh | |
### BEGIN INIT INFO | |
# Provides: puma | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Example initscript | |
# Description: This file should be used to construct scripts to be | |
# placed in /etc/init.d. |
source "http://rubygems.org/" | |
gem "sinatra", "~> 1.3.0" | |
gem "thin" |
production: | |
adapter: fb | |
database: ~/Documents/redmine/db/redmine.fdb | |
username: SYSDBA | |
password: masterkey | |
host: localhost | |
encoding: UTF-8 | |
create: true | |
development: |
module TenantModel | |
def self.included(base) | |
base.extend ClassMethods | |
base.instance_eval do | |
acts_as_tenant | |
end | |
end | |
class InvalidTenant < SecurityError; end |
// generates link to new issue form with prefilled values | |
// save the following code(single line) as bookmark | |
// use on new issue form to generate link | |
javascript:try{$('textarea[id=issue_description]').val(CKEDITOR.instances["issue_description"].getData());}catch(e){}s=$.param($('#issue-form *[name!=authenticity_token]').serializeArray());alert(location.href+"?"+s); |
# rails initializer to load *.ini into Rails.application.config | |
Dir.glob(File.join Rails.root, "/config/**/*.ini").each do |file_name| | |
config_name = File.basename(file_name, ".ini") | |
Rails.application.config.send "#{config_name}=", IniFile.new(file_name).to_struct.send(Rails.env) | |
end |
module Vienna | |
module Sorting | |
module ClassMethods | |
def sorted_by(field, options = {}) | |
@_sort_field = field | |
@_sort_descending = options.fetch(:order, "asc") != 'asc' | |
end |