Skip to content

Instantly share code, notes, and snippets.

View sergeylukin's full-sized avatar
🎯
Focusing

Sergey Lukin sergeylukin

🎯
Focusing
View GitHub Profile
// This patch changes the way Candle's UP state is detected
// Instead of comparing it to the previous candle, we just compare CLOSE and OPEN
// values here
(function(HC) {
var seriesTypes = HC.seriesTypes;
seriesTypes.candlestick.prototype.getAttribs = function () {
seriesTypes.column.prototype.getAttribs.apply(this, arguments);
@sergeylukin
sergeylukin / branch2command.sh
Created June 23, 2013 19:02
Run commands remotely through `git push` - example with 1 level deployment
#! /usr/bin/env sh
# This script accepts 1 mandatory argument:
# COMMAND
#
# It's run by git repo hook and current
# workign directory is the bare repo path
#
# Global variables accessible:
# $WORKTREE (points to the working tree)
#
@sergeylukin
sergeylukin / branch2command.sh
Created June 23, 2013 19:08
Run commands remotely through `git push` - example with 2 levels deployment
#! /usr/bin/env sh
# This script accepts 2 mandatory arguments:
# COMMAND and ENVIRONMENT
#
# It's run by git repo hook and current
# workign directory is the bare repo path
#
# Global variables accessible:
# $WORKTREE (points to the working tree)
#
@sergeylukin
sergeylukin / post-update
Created July 25, 2012 10:47
Git hook: deny specific branches to be pushed
#!/bin/sh
# <oldrev> <newrev> <refname>
# sanitize pushed branch
while read oldrev newrev ref
do
branch=$(echo $ref | awk -F'/' '{print $3}')
if [ "$branch" != "master" -a "$branch" != "docs" ]
then
echo It is not allowed to push any branch except for master and docs
/*****
*
* The contents of this file were written by Kevin Lindsey
* copyright 2002 Kevin Lindsey
*
* This file was compacted by jscompact
* A Perl utility written by Kevin Lindsey (kevin@kevlindev.com)
*
*****/
@sergeylukin
sergeylukin / godoc.sh
Created November 23, 2016 20:29
Run searchable local go lang documentation server
godoc -goroot=/usr/local/go -index -index_files=/tmp/godoc_index.db -write_index
godoc -v -goroot=/usr/local/go -http=:6060 -index -index_files=/tmp/godoc_index.db
@sergeylukin
sergeylukin / install_face_recognition.sh
Created July 12, 2017 01:59
face recognition ubuntu install
sudo apt-get update
sudo apt-get install build-essential
//sudo apt-get install python3-setuptools
//sudo easy_install3 pip
sudo apt-get install libboost-all-dev
sudo apt-get install python3-dev python3-pip python3-tk python3-lxml python3-six
@sergeylukin
sergeylukin / feed.xml
Created May 6, 2012 13:22
Git hook: Export pushed commit to RSS FEED
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xml:lang="en">
<title type="text">Git push feed</title>
</feed>
@sergeylukin
sergeylukin / karabiner.json
Created April 3, 2018 06:03
Karabiner configuration for playing F-117A on OS X
{
"complex_modifications": {
"parameters": {
"basic.simultaneous_threshold_milliseconds": 50,
"basic.to_delayed_action_delay_milliseconds": 500,
"basic.to_if_alone_timeout_milliseconds": 1000,
"basic.to_if_held_down_threshold_milliseconds": 500
},
"rules": [
{
@sergeylukin
sergeylukin / test.json
Created April 3, 2018 19:35
testing rtl values
{
"ch1": 1,
"ch2": 1,
"ch3": 1,
"title": "כפר סבא",
"ch4": 1,
"ch5": 1,
"ch6": 1,
"ch7": 1,
"ch8": 1,