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 | |
$str = 'fD3_'; | |
$chars = array_merge(range('a', 'z'), range('A', 'Z'), range('0', '9'), ['_']); | |
$total = 0; | |
$brut = ''; | |
$len = strlen($str); | |
/** | |
* @see: https://www.programmingalgorithms.com/algorithm/brute-force?lang=PHP | |
*/ |
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
[[!weather? | |
&cityId=`26850` | |
&tpl=`weather.tpl` | |
&cacheTime=`7200` | |
]] |
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 | |
$cmdSource = 'tx set --source -r modx-revolution.core-{:slug} -l {:lang} core/lexicon/{:lang}/{:file} -t PHP_ALT_ARRAY'; | |
$cmdTransl = 'tx set -r modx-revolution.core-{:slug} -l {:lang} core/lexicon/{:lang}/{:file} -t PHP_ALT_ARRAY'; | |
$search = ['{:slug}', '{:file}', '{:lang}']; | |
$langs = [ | |
'ru', | |
'de', | |
'cs', |
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)); |
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
1 | |
00:00:00,000 --> 00:00:23,042 | |
alright everyone I do it so it's ok so | |
she asked me to talk at Larkin goes to | |
2 | |
00:00:23,042 --> 00:00:28,064 | |
the last year was obliged i enjoy to | |
throw out hope some of you that reappear |