Skip to content

Instantly share code, notes, and snippets.

View gourytch's full-sized avatar

Lev V. Babchenko gourytch

  • Teracloud ApS
  • Copenhagen, Denmark
View GitHub Profile
@gourytch
gourytch / telegram_report.sh
Created July 1, 2015 07:09
simple telegram sender bot
#! /bin/bash
die() {
echo "EDIT YOUR ~/telegram_bot.rc AND RE-RUN!" 1>&2
exit 1
}
if [ ! -f $HOME/telegram_bot.rc ]; then
cat >$HOME/telegram_bot.rc <<_EOF_
#
#! /bin/bash
die() {
echo "EDIT YOUR ~/telegram_bot.rc AND RE-RUN!" 1>&2
exit 1
}
if [ ! -f $HOME/telegram_bot.rc ]; then
cat >$HOME/telegram_bot.rc <<_EOF_
#
// stacktrace.h (c) 2008, Timo Bingmann from http://idlebox.net/
// published under the WTFPL v2.0
#ifndef _STACKTRACE_H_
#define _STACKTRACE_H_
#include <stdio.h>
#include <stdlib.h>
#include <execinfo.h>
#include <cxxabi.h>
@gourytch
gourytch / opencv_build-git.sh
Created December 11, 2015 14:02
Build OpenCV static library set to $HOME/opt/
#! /bin/bash
set -e
set -x
THISDIR=$(dirname $(readlink -f "$0"))
CV_GIT="https://github.com/Itseez/opencv.git"
# CV_GIT_BRANCH="3.0.0"
# CV_VERSION="2.4.10"
#! /bin/bash
# prepumdu.sh -- # prepare usermodded debootstapped ubuntu
# using debootstrap, fakeroot, fakechroot
#
# usage:
# arch=amd64 \
# suite="trusty" \
# mirror="http://ru.archive.ubuntu.com/ubuntu" \
# proxy="http://proxy.mine:3128/" \
@gourytch
gourytch / calenserv.go
Created March 10, 2016 15:27
Simple Calenar
package main
import (
"bytes"
"fmt"
"io"
"net/http"
"time"
)
#! /bin/bash
master_container="$HOME/Dropbox/.safe"
master_mountpoint="$HOME/safe"
keyfile="$HOME/.keys/encfs-safe"
mount_master() {
echo "* mounting master cryptocontainer..."
if [ ! -d "$master_container" ]
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8" />
<meta name="description" content="80x24 screen editor" />
<title>80x24 screen editor</title>
<style type="text/css">
@font-face {
font-family: "webfix";
@gourytch
gourytch / livemap_reformatted.js
Last active July 5, 2016 05:01
livemap.js, переформатированный для удобочитаемости
/////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// LIVEMAP_REFORMATTED.JS
// SOURCE: http://map.playrust.io/js/rustio/livemap.js
// FORMAT: http://jsbeautifier.org/
//
/////////////////////////////////////////////////////////////////////////////////////////////////////////
function initLiveMap() {
$('#signin').click(function() {
#! /usr/bin/env python2.7
import subprocess
import threading
import re
import tempfile
import os
tmpdir = tempfile.mkdtemp()
luafile = tmpdir + "/dump.lua"