Skip to content

Instantly share code, notes, and snippets.

View eugeneai's full-sized avatar
🏠
Distant worker

Evgeny Cherkashin eugeneai

🏠
Distant worker
View GitHub Profile
@eugeneai
eugeneai / excel
Last active August 29, 2015 14:08
Simple script to run microsoft excel-2010 in a .2010 wine bottle.
#!/bin/bash
NAME=$(basename $0)
WINEPREFIX=$HOME/.2010
WPREF=$WINEPREFIX
MS_VER=14
MS_LOCATION=$WPREF/drive_c/Program\ Files/Microsoft\ Office/Office$MS_VER
WINEPREFIX="$WPREF" wine "$MS_LOCATION/$NAME.EXE" $* > /dev/null
@eugeneai
eugeneai / gist:8198d5472e21869556e3
Created November 16, 2014 02:08
cleanum docker
Cleanup docker images and containers
By Dan Sosedoff on 17 Dec 2013
Docker is a fantastic tool to create lightweight containers for any application or stack, powered by LXC, which im a big fan of. There are no special ways of building docker images, some folks are using Chef/Puppet, etc. However, docker brings a very simple way to define image build steps: Dockerfiles.
Example of the Dockerfile:
FROM ubuntu:12.04
MAINTAINER Dan Sosedoff "dan.sosedoff@gmail.com"
program fibnums;
{$APPTYPE CONSOLE}
uses
SysUtils;
Const
MaxVecLen=1024;
@eugeneai
eugeneai / beamer-template.tex
Last active August 29, 2015 14:19
Содержит пример беамер-текста с шрифтом без засечек, настраиваемый под PDFLaTeX и LuaLaTeX одновременно. Взято со страницы http://tex.stackexchange.com/questions/26805/how-to-use-unicode-math-with-beamer-and-lualatex. Еще один интересный пример - http://www.filewatcher.com/b/ftp/ftp.tex.ac.uk/tex-archive/info/examples/luaintro-0.html. И этот - h…
\documentclass[professionalfont]{beamer}
\usepackage[english]{babel}
\usepackage{iftex,ifxetex}
\ifPDFTeX
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\else
\ifluatex
\usepackage{unicode-math}
@eugeneai
eugeneai / PKGBUILD
Created April 18, 2015 01:52
PKGBUILD temporal publishing.
# Maintainer: Alexander Shuklin <jasuramme@mail.ru>
pkgname=ejudge
pkgver=3.3.1
pkgrel=0
pkgdesc="online programming competitions server"
arch=('i686' 'x86_64')
url="http://ejudge.ru/"
license=('GPL')
depends=(sendmail make gcc glibc bison flex gawk sed zlib ncurses expat libzip gettext curl util-linux)
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Grids;
type
TForm1 = class(TForm)
@eugeneai
eugeneai / sand_wa
Created May 19, 2015 07:18
recursion with sand watch
program lab_10;
uses crt;
const
n=60;
m=16;
var
l,i,a,j,k:integer;
procedure picture1(a,l,t:integer);
begin
@eugeneai
eugeneai / 00-keyboard.conf
Created July 11, 2015 08:02
Russian keyboard setup in xorg.conf
# /etc/X11/xorg.conf.d/00-keyboard.conf
Section "InputClass"
Identifier "system-keyboard"
MatchIsKeyboard "on"
Option "XkbLayout" "us,ru"
Option "XkbModel" "pc104"
Option "XkbVariant" ",winkeys"
Option "XkbOptions" "grp:caps_toggle,grp:alt_shift_toggle,terminate:ctrl_alt_bksp"
EndSection
#!/bin/env python2
import os, os.path
import pprint
import pickle
def gpg_move():
f=open("find_gpg.log")
for orig in f:
orig = orig.strip()
path = os.path.normpath(orig)
@eugeneai
eugeneai / tunnelbroker-net.sh
Created November 1, 2012 12:03 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
#!/bin/bash
#### This script is published by Philipp Klaus <philipp.l.klaus@web.de>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x