Skip to content

Instantly share code, notes, and snippets.

View iliaaw's full-sized avatar

Ilia Khokhriakov iliaaw

  • HeadHunter
  • Thailand, Bangkok
View GitHub Profile
#!/bin/bash
JENKINS_USER=
JENKINS_TOKEN=
echo "Updating jobs for stands: $@"
for s in $@; do
echo "$s:"
time JENKINS_USER="$JENKINS_USER" JENKINS_TOKEN="$JENKINS_TOKEN" ./jenkinsmanager.py --deletestand "$s"
time JENKINS_USER="$JENKINS_USER" JENKINS_TOKEN="$JENKINS_TOKEN" ./jenkinsmanager.py --clone release "$s"
done
@iliaaw
iliaaw / gist:7434889
Created November 12, 2013 17:20
Bash history completion
bind '"\e[A": history-search-backward'
bind '"\e[B": history-search-forward'
#!/usr/bin/liquidsoap
set("server.telnet", true)
files = playlist(
mode = "normal",
id = "files",
"PATH_TO_PLAYLIST.m3u"
)
@iliaaw
iliaaw / gist:5482899
Created April 29, 2013 16:46
Latex template for schemes
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{positioning,arrows,shapes,shadows}
\begin{document}
\tikzstyle{node} = [
rectangle,
thick,
minimum size=1cm,
draw=blue!50!black!50,
$.ajaxSetup({
beforeSend: function(jqXHR, settings) {
jqXHR.setRequestHeader('X-CSRF-Token', $('meta[name="csrf-token"]').attr('content'));
}
});
#include <stdio.h>
#include <math.h>
/*
* В этой функции считается сумма бесконечного ряда
*/
double my_awesome_ln(double x) {
double const epsilon = 0.0000001;
double z, delta, result;
int i;
@iliaaw
iliaaw / jabberbot.rb
Created November 4, 2012 22:02
God config to handle Unicorn
rails_env = ENV['RAILS_ENV'] || 'production'
rails_root = ENV['RAILS_ROOT'] || "/var/www/jabberbot"
God.watch do |w|
w.name = "unicorn"
w.interval = 30.seconds # default
# unicorn needs to be run from the rails root
w.start = "cd #{rails_root} && /usr/local/bin/unicorn_rails -c #{rails_root}/config/unicorn.rb -E #{rails_env} -D"