Skip to content

Instantly share code, notes, and snippets.

Loving Open Source

Avtandil Kikabidze akalongman

Loving Open Source
View GitHub Profile
akalongman / gist:9108753
Last active Aug 29, 2015
Nested check function
View gist:9108753
public function diagnosticTree()
$errors = array();
// Test 0
$sql = ' SELECT MIN(`left_key`) '

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
akalongman / copy
Created Mar 7, 2014
Copy folder recursively
View copy
$path = 'path/to/src';
$dest = 'path/to/dest';
foreach (
$iterator = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS),
RecursiveIteratorIterator::SELF_FIRST) as $item
) {
if ($item->isDir()) {
mkdir($dest . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
View build.gradle
android {
signingConfigs {
buildTypes {
release {
signingConfig signingConfigs.release
View genymotionwithplay.txt
Download the following ZIPs:
ARM Translation Installer v1.1 (
Download the correct GApps for your Android version:
Google Apps for Android 5.0 ( -
Google Apps for Android 4.4.4 ( -
Google Apps for Android 4.3 ( -
Google Apps for Android 4.2 ( -
Google Apps for Android 4.1 ( -
akalongman / build.gradle
Created Mar 20, 2015
Android build.gradle example
View build.gradle
apply plugin: ''
def getBuildDate() {
def date = new Date()
def formattedDate = date.format("yyyy-MM-dd'T'HH:mm:ss'Z'")
return formattedDate
def BUILD_DATE = getBuildDate()
android {
akalongman / underscore_to_camelcase
Created Jun 1, 2015
Regexp for converting underscore methods to CamelCase for Sublime Text
View underscore_to_camelcase
Search: function (\w+)_(\w)
Replace: function $1\U$2\E
If underscores is more then one, you can run this replace multiple time
View gulpfile.json
var gulp = require('gulp');
var minifyCss = require('gulp-minify-css');
var gulpConcat = require('gulp-concat');
var uglify = require('gulp-uglify');
var notify = require('gulp-notify');
var cssFiles = [
akalongman / reset.css
Created Dec 16, 2013
Reset CSS file to browser defaults
View reset.css
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,