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/zsh | |
# add the line under to your zshrc: | |
# source checkpacman.zsh | |
rnd=$(( (RANDOM % 5) )) | |
if [ $rnd -ne 0 ]; then | |
return | |
else | |
echo "Checking the time of last update..." |
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/sh | |
if [ ! `id -u` -eq 0 ]; then | |
echo "You must run this script as root" | |
exit | |
fi | |
BASE_PATH=`pwd` | |
if [ ! -d "httpd-2.4.2" ]; then |
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
" Replace 2 space-indents to tabs on open | |
" and switch them back on close | |
function SpacesToTabs() | |
set ts=4 | |
set sw=4 | |
set sts=0 | |
set noexpandtab |
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 'net/http' | |
require 'uri' | |
require 'json' | |
class BitcoinRPC | |
def initialize(service_url) | |
@uri = URI.parse(service_url) | |
end | |
def method_missing(name, *args) |
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
Ansi 0 Color (Black) | |
79, 79, 79 | |
#4f4f4f | |
Ansi 1 Color (Blue) | |
96, 108, 255 | |
#606cff | |
Ansi 2 Color (Green) | |
96, 255, 168 |
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
ANSI Color 0 (Black) | |
#626262 | |
ANSI Color 1 (Red) | |
#F18071 | |
ANSI Color 2 (Green) | |
#B2F472 | |
ANSI Color 3 (Brown/Yellow) |
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
Section "InputClass" | |
Identifier "Clickpad" | |
MatchIsTouchpad "on" | |
MatchDevicePath "/dev/input/event*" | |
Driver "evdev" | |
# RightButtonAreaLeft RightButtonAreaRight RightButtonAreaTop RightButtonAreaBottom MiddleButtonAreaLeft MiddleButtonAreaRight MiddleButtonAreaTop MiddleButtonAreaBottom | |
Option "SoftButtonAreas" "66% 0 0 0 50% 64% 0 0" | |
# Disable tapping and scrolling |
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
SUBSYSTEM=="serio", DRIVERS=="psmouse", WAIT_FOR="/sys/devices/platform/i8042/serio1/serio2/sensitivity", ATTR{sensitivity}="175", ATTR{speed}=100" |
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
# coding: UTF-8 | |
# 山を確認するためだけのメソッド | |
def show_array(array) | |
array.each {|e| | |
puts "#{e}: #{"***" * e}" | |
} | |
end | |
def camelize(target, bump_count) |
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
# coding: UTF-8 | |
def font_size(rank, max) | |
rate = rank.to_f / max | |
if rate > 6.to_f / 7 | |
return 7 | |
elsif rate > 5.to_f / 7 | |
return 6 | |
elsif rate > 4.to_f / 7 |
OlderNewer