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 / gourbot.go
Created January 18, 2016 02:49
small telegram bot example for golang
// test new bot api
// start it as:
// gourbot "token:forBot"
// or
// BOT_TOKEN="token:forBot" gourbot
//
package main
import (
@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"
// 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>
#! /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_
#
@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_
#