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"
@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 (
#! /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";
// ==UserScript==
// @name FBCBot
// @namespace https://localhost/fbcbot
// @description freebitco.in bot
// @include https://freebitco.in/*
// @version 1
// @grant none
// @noframes
// @run-at document-idle
// ==/UserScript==