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 -)" |
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 | |
# | |
# This script processes events from smsd. | |
# It mainly will converts SMS encoded with UCS2 encoding to UTF-8 format expected by many other applications. | |
# To use it, edit your /etc/smsd.conf and add the following line: | |
# | |
# eventhandler = /path/to/smstools-eventhandler.sh | |
# | |
# When a new message is received in /var/spool/incoming/, message files with following header line will be converted: | |
# |
#!/bin/bash | |
# | |
# This script processes events from smsd. | |
# It mainly will converts SMS encoded with UCS2 encoding to UTF-8 format expected by many other applications. | |
# To use it, edit your /etc/smsd.conf and add the following line: | |
# | |
# eventhandler = /path/to/smstools-eventhandler.sh | |
# | |
# When a new message is received in /var/spool/incoming/, message files with following header line will be converted: | |
# |
require "socket" | |
class Pt32 | |
class Status | |
attr_reader :temperature, :program, :boiler_on | |
def initialize(temperature, program, boiler_on) | |
@temperature, @program, @boiler_on = temperature, program, boiler_on | |
end | |
end |
# Current Czech Name Day | |
require "base64" | |
name = ""; name_next = "" | |
Base64.decode64(DATA.read).each_line do |line| | |
name_day = line.split(" ", 3) | |
if name_day[0].to_i == Time.now.month && Time.now.day == name_day[1].to_i | |
name = name_day[2].strip | |
name = name[1..-1] if name.start_with? "|" |
<script> | |
// Creates a Print function as an alias for console.log | |
// Usage Print("Hello World"); | |
function Print(v) { console.log(v); return v }; | |
</script> |
# Console Calendar | |
DAYS_IN_MONTH = [nil, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] | |
IS_LEAP_YEAR = Time.now.year % 400 == 0 || ( | |
Time.now.year % 4 == 0 && Time.now.year % 100 != 0 | |
) | |
HIGHLIGHT_CURRENT_DAY = true | |
def days_in_month(month) | |
return 29 if Time.now.month == 2 |