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
# @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
@akalongman
akalongman / gulpfile.js
Created November 4, 2015 11:42
Gulp task for uploading files to ftp/sftp server based on Sublime Text sftp-config.json configuration file
const gutil = require('gulp-util');
const ftp = require( 'vinyl-ftp' );
const sftp = require('gulp-sftp');
// task for deploying files on the server
gulp.task('deploy', function() {
const config = require('./sftp-config.json');
const globs = [
'folder/file',
@akalongman
akalongman / ubuntu-15.10.md
Last active February 10, 2016 08:18
Ubuntu 15.10
@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 / 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 / php-soap.php
Created April 1, 2015 08:44
PHP soap client example
ini_set('soap.wsdl_cache_enabled', 0);
ini_set('soap.wsdl_cache_ttl', 900);
ini_set('default_socket_timeout', 15);
$params = array('param1'=>$param1);
$wsdl = 'http://service_url/method?WSDL';
@akalongman
akalongman / build.gradle
Created March 20, 2015 10:21
Android build.gradle example
apply plugin: 'com.android.application'
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 {
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 / port_scanner.php
Created May 7, 2014 12:32
Port scanner on PHP
<?php
ini_set('max_execution_time', 0);
ini_set('memory_limit', -1);
$host = 'google.com';
$ports = array(21, 25, 80, 81, 110, 143, 443, 587, 2525, 3306);
foreach ($ports as $port)
{
$connection = @fsockopen($host, $port, $errno, $errstr, 2);
android {
signingConfigs {
release
}
buildTypes {
release {
signingConfig signingConfigs.release
}