Skip to content

Instantly share code, notes, and snippets.

View yantonov's full-sized avatar

Yury Antonov yantonov

  • The Milky Way galaxy
View GitHub Profile
@yantonov
yantonov / restore-skype-icon.md
Created May 4, 2014 05:00
Restore missing skype icon for ubuntu 14.04

On 64bit, the required package to get a Skype tray / appindicator icon is not installed automatically. To fix this, use the following command:

sudo apt-get install sni-qt:i386

The Skype tray icon might disappear after you log in, but it should show up after a few seconds.

@yantonov
yantonov / tortoisemerge-for-tortoisehg.md
Created April 9, 2014 10:11
how to install tortoisemerge to torgoisehg

how to install tortoisemerge to torgoisehg

Install latest tortoiseSVN (tortoise merge is included).

Assumed TortoiseSVN is installed to C:\Program Files\TortoiseSVN\

Edit .hgrc

[extdiff]

cmd.tortoisemerge = C:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe

@yantonov
yantonov / install-ghc-ubuntu.md
Last active June 11, 2020 09:20
How to install latest GHC from source + latest stack + cabal + cabal-install on ubuntu

How to install GHC from source + latest stack + cabal + cabal-install on ubuntu

for your convinience this instuction is available as:
gist
git repo

preferred way install stack than install ghc

stack (package manager and build tool, preferrered way to manage dependencies)

# settings
@yantonov
yantonov / android-as-media-device.sh
Created December 1, 2013 17:45
how to mount android as media device on ubuntu
# HOW TO mount android as media device on ubuntu
# Step 1:
# Enable Developer options and enable USB debugging mode.
# Setting > About phone > Start tapping (7 times)
# on Build number option 'you are now developer'
# Then go to Setting > Developer options > Enable USB Debugging
# mount nexus 4
# Step 2:
@yantonov
yantonov / mgdb.sh
Created July 24, 2013 01:49
mongod start script
#/bin/bash
function start {
$MONGODB_HOME/bin/mongod --config=$MONGODB_HOME/bin/mongo.conf
}
case $1 in
start)
start
;;
@yantonov
yantonov / catalina.sh
Created July 7, 2013 05:43
tomcat start/stop script
#!/bin/bash
# Tomcat start/stop script
export JAVA_HOME=~/Development/bin/jdk
export CATALINA_HOME=~/Development/bin/tomcat
export JAVA_OPTS="-Dorg.apache.catalina.session.StandardSession.ACTIVITY_CHECK=true -Dorg.apache.catalina.STRICT_SERVLET_COMPLIANCE=true"
CONTEXT_CONF_DIR=`dirname $0`/app-context
function out_action() {
echo "--------------------------------"
@yantonov
yantonov / seq_test.clj
Last active December 26, 2015 14:07
How to dechunk(unchunk) sequence in clojure. Chunked and dechunked sequence realization count example.
(ns seq-test)
(ns seq-test
(:require [clojure.test :as test]))
;; clarification 1
;; be carefull this functions guarantees one-by-one fetching for client of the dechunk function,
;; but NOT guarantees that source seq will not be evaluated forward by chunks
;; given tests demonstrates it
@yantonov
yantonov / bitrev.clj
Last active December 10, 2015 01:34
Reverse binary representation of 8 (16) bit numbers
(ns bitrev
(use clojure.test))
;; http://dolzhenko.blogspot.ru/2012/12/blog-post.html
;; reverse binary representation of 8 bit number
;; reverse binary representation of 16 bit number
(defn reverse-8bit
"reverse 8 bit number"
[n]
@yantonov
yantonov / pidbyname.sh
Last active October 14, 2015 02:17
Get process id by name in linux.
##/bin/bash
# find process id by name
# returns pid
if [ $# -lt 1 ]; then
echo "Usage: pidbyname name"
exit 0
else
EXEC_NAME=$1
@yantonov
yantonov / hg2git.sh
Last active March 25, 2016 05:32
Creates git repo from mercurial repo using fast-export tool
#/bin/bash
# script creates git repo from hg (mercurial) repo using fast-export tool
tempDirectory="tmp-"`date +%s`
function get_working_directory_path() {
echo "/tmp/$tempDirectory"
}