Skip to content

Instantly share code, notes, and snippets.

View asukharev's full-sized avatar

Alexander Sukharev asukharev

View GitHub Profile
@asukharev
asukharev / TestServer.hs
Created November 8, 2013 22:39
Test server for requests debugging
import Control.Monad
import Data.Char
import System.IO
import Network
import Data.Time.LocalTime
import Data.Maybe
import System.Directory
import System.IO
import System.IO.Error
//
// TCollection.hpp
//
#ifndef TCOLLECTION_HPP_
#define TCOLLECTION_HPP_
#include <vector>
#include <assert.h>
@asukharev
asukharev / Thread.h
Created January 10, 2013 23:12
Thread.h
/*
* Thread.h
*
* Created on: 09.01.2013
* Author: asuk
*/
#ifndef THREAD_H_
#define THREAD_H_
@asukharev
asukharev / Singleton.h
Last active December 10, 2015 17:58
c++ singleton pattern
//
// Singleton.h
//
// Created by Alexander Sukharev on 05.01.13.
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php
//
#ifndef Singleton_h
#define Singleton_h
@asukharev
asukharev / gist:2517258
Created April 28, 2012 08:46
Git remote using iCloud Back To My Mac
git remote add iMac ssh://[email protected]/~/path/to-repo/
hostname is
$ hostname
iMac.local <- this one without .local
xxxxxxxxx
=========
$ dns-sd -E
Looking for recommended registration domains:
@asukharev
asukharev / gist:2339805
Created April 8, 2012 20:47
Xcode auto-versioning script
if [ "$CONFIGURATION" != "Release" ]; then
SHA=`git rev-parse --short HEAD`
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $SHA" "${TARGET_BUILD_DIR}"/${INFOPLIST_PATH}
fi