Skip to content

Instantly share code, notes, and snippets.

View akalongman's full-sized avatar
:octocat:
Loving Open Source

Avtandil Kikabidze akalongman

:octocat:
Loving Open Source
View GitHub Profile

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@akalongman
akalongman / gist:9108753
Last active August 29, 2015 13:56
Nested check function
public function diagnosticTree()
{
$errors = array();
$this->_lock();
// Test 0
$sql = ' SELECT MIN(`left_key`) '
@akalongman
akalongman / copy
Created March 7, 2014 08:43
Copy folder recursively
$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());
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip)
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip)
Google Apps for Android 4.2 (https://www.androidfilehost.com/?fid=23060877490000128 - gapps-jb-20130812-signed.zip)
Google Apps for Android 4.1 (https://www.androidfilehost.com/?fid=22979706399755082 - gapps-jb-20121011-signed.zip)
@akalongman
akalongman / underscore_to_camelcase
Created June 1, 2015 12:23
Regexp for converting underscore methods to CamelCase for Sublime Text
Search: function (\w+)_(\w)
Replace: function $1\U$2\E
If underscores is more then one, you can run this replace multiple time
@akalongman
akalongman / gulpfile.json
Created September 23, 2015 16:59
Gulp file example
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 = [
'public_html/res/css/bootstrap.css',
'public_html/res/css/datetimepicker.css',
'public_html/res/css/datepicker.css',
@akalongman
akalongman / reset.css
Created December 16, 2013 10:03
Reset CSS file to browser defaults
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,
@akalongman
akalongman / ubuntu-15.10.md
Last active February 10, 2016 08:18
Ubuntu 15.10
# @author Avtandil Kikabidze
# @copyright Copyright (c) 2008-2016, Avtandil Kikabidze aka LONGMAN (akalongman@gmail.com)
# @link http://longman.me
# @license The MIT License (MIT)
import sublime
import sublime_plugin
import Git.git
import functools