Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env ruby
# script to upload binaries to github release from Jenkins
# anton.kisel@gmail.com
require 'json'
require 'restclient'
require 'uri'
GITHUB_OAUTH_TOKEN=ENV['GITHUB_OAUTH_TOKEN'] || abort("GITHUB_OAUTH_TOKEN not specified")
@kisel
kisel / install_couchdb1.4_ubuntu12.04.sh
Last active January 1, 2016 02:29
Installs CouchDb 1.4 from sourcesfor docker ubuntu:12.04 image
#!/bin/sh
# Installs CouchDb to Ubuntu 12.04
# for docker ubuntu:12.04
set -e
# echo "deb http://archive.ubuntu.com/ubuntu precise universe" > /etc/apt/sources.list.d/ubuntu-precise-universe.list
# apt-get update
@kisel
kisel / install_nodejs_ubuntu.sh
Created December 22, 2013 09:33
Installs NodeJS & npm from sources on Ubuntu
#!/bin/sh
# Installs NodeJS & npm from sources on Ubuntu
set -e
apt-get install -y build-essential python curl wget
cd /tmp
wget http://nodejs.org/dist/v0.10.24/node-v0.10.24.tar.gz
@kisel
kisel / install_opencart.sh
Created January 5, 2014 20:18
Install Opencart on docker container
#!/bin/sh
echo 'deb http://archive.ubuntu.com/ubuntu precise main universe' > /etc/apt/sources.list
apt-get update
apt-get install -y mysql-server curl apache2 git-core php5 php5-mysql php5-curl php5-gd php5-mcrypt
#dpkg-divert --local --rename --add /sbin/initctl
#ln -s /bin/true /sbin/initctl
@kisel
kisel / jenkins_on_docker.sh
Created February 22, 2014 14:51
Installs Jenkins on Ubuntu
#!/bin/sh
apt-get update
apt-get install -y wget
wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add -
sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'
apt-get update
apt-get install -y jenkins
service jenkins start
echo "Jenkins is available at 8080 port"
@kisel
kisel / install_vim_vundle.sh
Created May 1, 2014 10:46
vimrc with vundle
#!/bin/sh
# curl -L https://gist.githubusercontent.com/kisel/11449026/raw/install_vim_vundle.sh | sh
sudo apt-get install -y git
mkdir -p $HOME/.vim
git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
curl -L --output ~/.vimrc https://gist.githubusercontent.com/kisel/11449026/raw/vimrc
cat <<END > ~/.tmux.conf
set -g default-terminal "screen-256color"
END
/*
usage:
gcc -o show_c_sizeof show_c_sizeof.c && ./show_c_sizeof
*/
#include <stdio.h>
#define S(type) \
printf("sizeof(" #type ") = %d\n", (int)(sizeof(type)))
// gcc -I . -L./.libs -lcares ares-custom-dns-test.c;
#include <ares.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netdb.h>
#include <stdarg.h>
#include <string.h>
@kisel
kisel / killcx
Last active March 7, 2024 12:30
killcx
#!/usr/bin/perl
######################################################################
# killcx :
#
# Close a TCP connection under Linux.
#
# (c) Jerome Bruandet - <floodmon@spamcleaner.org>
#
# version 1.0.3 - 18-May-2011
#
@kisel
kisel / runtastic-export-all-activities.md
Last active July 5, 2016 17:55
Download all activities from Runtastic.com (as .gpx)

Download all activities from Runtastic 🏃

With this script you can download all your activities from www.runtastic.com in .tcx format. Runtastic removed this feature wich makes it very difficult to change your tracking service, thanks for that.

Fork changes: it downloads .tcx instead of .gpx and supports large files(original implementation fails with Netowork error and the Downloads page crashes due to huge size of a.href)

How does it work

Login to your runtastic account and go to the page where all your activities are listed. Then open the developer tools of Chrome with CMD + OPTION + I and go to the console tab. Now copy and paste the following script in the console line and press enter. The usually content should disapear and the downloads should start. I used it to export around 290 activities and it worked fine.