This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DEPLOY_PATH="/var/www/site" | |
DEPLOYER_PATH="deploy.js" | |
SOURCE="${BASH_SOURCE[0]}" | |
while [ -h "$SOURCE" ]; do | |
TARGET="$(readlink "$SOURCE")" | |
if [[ $SOURCE == /* ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fs = require('fs'); | |
var Connection = require('ssh2'); | |
var chokidar = require('chokidar'); | |
var c = new Connection(); | |
var local_path; | |
var deploy_path; | |
process.argv.forEach(function (val, index, array) { | |
var item_arr = val.split('='); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function makeTree($list, $parent) | |
{ | |
$tree = []; | |
foreach ($list as $item) { | |
if ($item['parent'] == $parent) { | |
$tree[$item['id']] = makeTree($list, $item['id']); | |
} else { | |
continue; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$from = "en"; | |
$to = "ru"; | |
$_lang = []; | |
$dir = "/home/ik/dev2/revolution/core/lexicon/" . $from; | |
$files = scandir($dir); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$string = '1000000000'; | |
$array = preg_split('/(?<!^)(?!$)/u', $string); | |
$array = array_chunk(array_reverse($array), 3); | |
foreach($array as &$a){ | |
$a = implode("", $a); | |
} | |
$result = implode(" ", array_reverse($array)); |
NewerOlder