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
@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());
@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`) '

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 / 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,