Skip to content

Instantly share code, notes, and snippets.

View yaitskov's full-sized avatar

Daneel S. Yaitskov yaitskov

  • 40 years without a release
  • AirBnB
View GitHub Profile
@yaitskov
yaitskov / console-font.c
Created December 11, 2012 20:55
program for creation bitmap console font in linux terminal
#include <curses.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <stdio.h>
#include <errno.h>
//#include <malloc.h>
#define EBADFORMAT 0x0f000000
@yaitskov
yaitskov / dic-mode.el
Created December 11, 2012 20:53
emacs minor mode to input english transcription symbols in utf8
(define-minor-mode endic-mode
"Override several keystrokes beginning with Esc-Esc. They are used to insert
the symbols of english transcription."
nil " Dictionary"
'(("\e\ec" . (lambda () (interactive) (insert "ɔ")))
("\e\eo" . (lambda () (interactive)(insert "ծ")))
("\e\es" . (lambda () (interactive)(insert "ʃ")))
("\e\et" . (lambda () (interactive)(insert "ɛ")))
("\e\ep" . (lambda () (interactive)(insert "ʓ")))
("\e\ee" . (lambda () (interactive)(insert "ə")))
@yaitskov
yaitskov / .gitconfig
Created December 11, 2012 20:22
my git config
[user]
name = Daneel S. Yaitskov
email = rtfm.rtfm.rtfm@gmail.com
#disable pager
[core]
pager =
@yaitskov
yaitskov / git-alias.sh
Created December 11, 2012 20:20
my git aliases
alias ls='ls --block-size=h'
alias man='LANG=en man'
alias emacs='emacs -fg white -bg black -g 80x20'
alias gvim='gvim -geometry=90x7+0+524'
alias gist="git status"
alias giff="git diff"
alias gacm="git commit -a"
alias got="git commit"
alias gba="git branch"
@yaitskov
yaitskov / gist:4259789
Created December 11, 2012 16:09
yum repo configuration
exapmle of /etc/yum.repos.d/test.repo
[my-tpl]
name=Jelastic Tpl Repo
mirrorlist=http://x:x@repo.jelastic.com/tpl/mirrorlist/centos-6-jelastic-tpl-repo
failovermethod=priority
enabled=1
gpgcheck=0
@yaitskov
yaitskov / template6.sh
Created December 11, 2012 09:55
update virtuozzo templates
#!/bin/bash
cat <<EOF > /vz/template/centos/5/x86_64/config/os/default/mirrorlist
\$SW_SERVER/download/mirrors/centos-5
\$SW_SERVER/download/mirrors/updates-released-ce5
http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=os
http://mirrorlist.centos.org/?release=5&arch=x86_64&repo=updates
EOF
@yaitskov
yaitskov / chef.sh
Created December 11, 2012 09:54
concurrent launch scripts on multiple ssh servers
#!/bin/bash
SERVERS=servers.txt
SCRIPT="template6.sh"
#SCRIPT="test.sh"
rm -rf logs
mkdir logs
for target in `cat $SERVERS` ; do
echo connecting to $target
ssh root@$target bash < $SCRIPT 2>&1 | tee logs/$target.log &