This file contains hidden or 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 Handlers | |
constructor: -> | |
@handlers = {} | |
register: (handler, registered_class) -> | |
@handlers[handler] = registered_class | |
instantiate: (handlers, element) -> | |
handlers = handlers.replace(/\s/g, '').split(',') | |
element.handlers = [] |
This file contains hidden or 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
# Sends reminders to issue assignees | |
# Available options: | |
# * :days => how many days in the future to remind about (defaults to 7) | |
# * :tracker => id of tracker for filtering issues (defaults to all trackers) | |
# * :project => id or identifier of project to process (defaults to all projects) | |
# * :users => array of user ids who should be reminded | |
def self.reminders(options={}) | |
days = options[:days] || 7 | |
project = options[:project] ? Project.find(options[:project]) : nil | |
tracker = options[:tracker] ? Tracker.find(options[:tracker]) : nil |
This file contains hidden or 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
{ | |
'packages': { | |
'groups': ['KDE', 'Gnome', 'minimal'], | |
'else': ['inkscape', 'gimp', 'firefox'] | |
}, | |
'timezone': 'Europe/Moscow', | |
'users': { | |
'root': {'password': 'asdf'}, | |
'rogvold': {'password': 'qwerty', | |
'full_name': 'Rogaboru Kujimoshi', |
This file contains hidden or 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
wget -O chruby-0.3.4.tar.gz https://github.com/postmodern/chruby/archive/v0.3.4.tar.gz | |
tar -xzvf chruby-0.3.4.tar.gz | |
cd chruby-0.3.4 | |
PREFIX=$HOME/chruby make install | |
echo 'source ~/chruby/share/chruby/chruby.sh' >> ~/.bash_login | |
git clone git://github.com/sstephenson/ruby-build.git ~/chruby-0.3.4/ruby-build | |
cd ~/chruby-0.3.4/ruby-build | |
PREFIX=$HOME/chruby ./install.sh | |
~/chruby/bin/ruby-build 2.0.0-p0 ~/.rubies/2.0.0-p0 | |
echo 'chruby 2.0.0-p0' >> ~/.bash_login |
This file contains hidden or 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 -*- | |
FEMININE = 0 | |
MASCULINE = 1 | |
UNDEF = -1 | |
MASCULINE_NAMES = %w[Аба Азарья Акива Аккужа Аникита Алёша Андрюха Андрюша Аса Байгужа | |
Вафа Ваня Вася Витя Вова Володя Габдулла Габидулла Гаврила Гадельша | |
Гайнулла Гайса Гайфулла Галиулла Гарри Гата Гдалья Гийора Гиля Гошеа | |
Данила Джиханша Дима Зайнулла Закария Зия Зосима Зхарья Зыя Идельгужа |
This file contains hidden or 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 | |
HERE=0 | |
while [ 1 -eq 1 ]; do | |
hcitool info 54:9B:12:9B:9E:0D > /dev/null | |
MAG=$? | |
hcitool info F4:9F:54:4F:6F:23 > /dev/null | |
V1RUS=$? | |
if [ $V1RUS -eq 0 -o $MAG -eq 0 ] ; then | |
echo "HE IS HERE" |
This file contains hidden or 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
convert "$1" -bordercolor white -border 1x1 \ | |
-alpha set -channel RGBA -fuzz 20% \ | |
-fill none -floodfill +0+0 white \ | |
-shave 1x1 $2 |
This file contains hidden or 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
# Check for an interactive session | |
[ -z "$PS1" ] && return | |
alias ls='ls --color=auto' | |
PS1='[\u@\h \W]\$ ' | |
bash_prompt() { | |
local NONE="\[\033[0m\]" # unsets color to term's fg color | |
This file contains hidden or 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
cat /usr/share/uwsgi/conf/default.ini | |
# User-made changes in this file will be silently lost, as it is silently | |
# rewrited with upgrade of uwsgi package. | |
# | |
# If you want to change default options of uWSGI daemon, then: | |
# * copy this file somewhere | |
# * add/remove/change options in copied file | |
# * edit /etc/default/uwsgi and change location of inherited configuration | |
# file to path to copied file |
This file contains hidden or 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
iostat -x | |
Linux 2.6.32-5-amd64 (d-hc.ru) 08/24/2012 _x86_64_ (8 CPU) | |
avg-cpu: %user %nice %system %iowait %steal %idle | |
1.14 0.00 0.25 1.89 0.00 96.72 | |
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s avgrq-sz avgqu-sz await svctm %util | |
sda 4.38 21.96 1.80 15.62 729.42 298.68 59.05 0.63 36.34 14.34 24.97 | |
sdb 3.86 21.95 2.36 15.62 733.11 298.68 57.36 0.54 30.29 12.87 23.14 | |
md0 0.00 0.00 0.00 0.00 0.00 0.02 7.98 0.00 0.00 0.00 0.00 |