Skip to content

Instantly share code, notes, and snippets.

View 1d10t's full-sized avatar
❄️
winter in russian midland is longer than 1/2 of year

Serg 1d10t

❄️
winter in russian midland is longer than 1/2 of year
View GitHub Profile
<?php
class slowAES_aes
{
static $keySize = array(
'SIZE_128' => 16,
'SIZE_192' => 24,
'SIZE_256' => 32
);
@1d10t
1d10t / scr
Created December 19, 2016 16:02
screen tool: list, attach, reattach
#!/usr/bin/php
<?php
error_reporting(E_ALL);
function scr_ls(){
ob_start();
passthru('screen -ls');
$ss = explode("\n", ob_get_clean());
$scrs = array();
@1d10t
1d10t / ade1i52, adg0i56(?), adg0i57. e0-e3 immo on-off
Last active November 23, 2016 22:16
hyundai accent tagaz stock/commercial firmware changes block list
0)
offset: 65545 0x10009
end: 65546 0x1000a
size: 2
1)
offset: 65549 0x1000d
end: 65549 0x1000d
size: 1
2)
offset: 65552 0x10010
@1d10t
1d10t / cscart_cron.php
Last active November 30, 2016 16:44
cs-cart cron wrapper
#!/usr/bin/php
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
ini_set('memory_limit','1G');
set_time_limit(0);
$opt = getopt('', array(
'host:',
'dir:',
@1d10t
1d10t / pack.bat
Last active December 5, 2016 00:52
cs-cart addon packer
php -f ../pack.php
@1d10t
1d10t / arch.sh
Last active November 7, 2016 17:29
masterhost.ru bitrix archive script
#!/bin/sh
WWW="www"
AWK_EXPR='{if($0~/\.(php|js|css|tpl|sql|xml|htaccess|ini)/&&$0!~/\/(tpl_c|upload|managed_cache|stack_cache|cache\/(cs|j)s\/s[0-9]+|app\/bitrix\/cache|bitrix\/modules\/[^\/]+\/install\/)\//)print $0}'
DOMAIN=`basename \`pwd\``
LIST="Include"
ARCHIVE=$WWW"/"$DOMAIN"-"`date '+%F'`".tgz"
if [ -n "$1" ]
then
#!/bin/sh
DOMAIN=`basename \`pwd\``
MYSQL_CNF="../mysql_"$DOMAIN".cnf"
MYSQL_DB_FILE="../mysql_"$DOMAIN".db"
MYSQL_DB=""
if [ -f $MYSQL_DB_FILE ]
then
MYSQL_DB=`cat $MYSQL_DB_FILE`
@1d10t
1d10t / arch.sh
Last active November 7, 2016 17:28
beget.ru cs-cart archive script
#!/bin/sh
WWW="public_html"
AWK_EXPR='{if($0~/\.(php|js|css|tpl|sql|xml|htaccess)/&&$0!~/\/(var\/(cache|backups|files))\//)print $0}'
DOMAIN=`basename \`pwd\``
LIST="Include"
ARCHIVE=$WWW"/"$DOMAIN"-"`date '+%F'`".tgz"
if [ -n "$1" ]
then