Skip to content

Instantly share code, notes, and snippets.

View CB9TOIIIA's full-sized avatar
💭
Make JBZoo Great Again ^_^

Eugene Kopylov CB9TOIIIA

💭
Make JBZoo Great Again ^_^
View GitHub Profile
@CB9TOIIIA
CB9TOIIIA / Маска для телефона js
Created January 10, 2017 12:33
Маска для телефона js
/*
jQuery Masked Input Plugin
Copyright (c) 2007 - 2015 Josh Bush (digitalbush.com)
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
Version: 1.4.1
*/
!function(factory) {
"function" == typeof define && define.amd ? define([ "jquery" ], factory) : factory("object" == typeof exports ? require("jquery") : jQuery);
}(function($) {
var caretTimeoutId, ua = navigator.userAgent, iPhone = /iphone/i.test(ua), chrome = /chrome/i.test(ua), android = /android/i.test(ua);
<?php
$rand = rand(1, 999999);
$source = 'https://lenta.ru/rs'.'?'.$rand; //fix for cache
// http://manage.megapo.st 8 минута// 16 минута// 24 минута// 32 минута// 40 минута// 48 минута// 56 минута// 8 минута
$options = array(
'http'=>array(
'method'=>"GET",
@CB9TOIIIA
CB9TOIIIA / style.less
Created December 20, 2016 11:00
yoo_master2 fonts - open sans
@import 'https://fonts.googleapis.com/css?family=Open+Sans:400,300';
на
@import url("https://fonts.googleapis.com/css?family=Open+Sans:300,400&subset=latin,cyrillic");
@CB9TOIIIA
CB9TOIIIA / Костыль link Zoo
Created December 8, 2016 09:12
Костыль link Zoo
@CB9TOIIIA
CB9TOIIIA / data create find
Created December 8, 2016 05:26
data create find
$data = $this->app->data->create($element->data());
$value = $data->find("0.value");
@CB9TOIIIA
CB9TOIIIA / gist:c14fdcbb3e60d54e45155dc81befeb40
Last active September 28, 2017 08:00
jbzoo CLI - u.ua - proc_open ON
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias ll='ls -l'
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
@CB9TOIIIA
CB9TOIIIA / file_get_contents через stream_context_create - псевдо CURL
Created December 1, 2016 12:02
file_get_contents через stream_context_create // псевдо CURL
$options = array(
'http'=>array(
'method'=>"GET",
'header'=>"Accept-language: en\r\n" .
"Cookie: foo=bar\r\n" .
"User-Agent: Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B334b Safari/531.21.102011-10-16 20:23:10\r\n" // i.e. An iPad
)
);
$context = stream_context_create($options);
@CB9TOIIIA
CB9TOIIIA / Сортировка array_multisort
Last active December 1, 2016 12:02
Сортировка array_multisort
array_multisort($totalall, $datear, $FB_value_urlar, $fbcountar, $vkcountar, $okcountar, $FB_value_titles, SORT_DESC, SORT_NUMERIC);
$globalsoc = [$totalall, $datear, $FB_value_urlar, $fbcountar, $vkcountar, $okcountar, $FB_value_titles];
array_multisort($globalsoc[0], SORT_DESC, SORT_NUMERIC, $globalsoc[1], SORT_STRING, SORT_DESC, $globalsoc[2], SORT_NUMERIC, SORT_DESC, $globalsoc[3], SORT_NUMERIC, SORT_DESC, $globalsoc[4], SORT_NUMERIC, SORT_DESC, $globalsoc[5], SORT_NUMERIC, SORT_DESC, $globalsoc[6], SORT_STRING, SORT_DESC);
@CB9TOIIIA
CB9TOIIIA / .bash_profile
Created November 23, 2016 12:21 — forked from SmetDenis/.bash_profile
jbzoo bashrc
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
@CB9TOIIIA
CB9TOIIIA / cron.sh
Created November 23, 2016 12:21 — forked from SmetDenis/cron.sh
0 0 * * * /some/path/to/a/file.php > $HOME/`date +\%Y\%m\%d\%H\%M\%S`-cron.log 2>&1
jbzoo items:items-import -vvv >> /home/vsem/logs/cron-jbzoo/`date +\%Y-\%m-\%d_\%H-\%M-\%S`-cron.log 2>&1
* * * * * /usr/local/bin/php -c /etc/php.ini ~/cli/jbzoo/vendor/jbzoo/console/bin/jbzoo items:items-import -vvv >> /home/vsem/logs/cron-jbzoo/`date +\%Y-\%m-\%d_\%H-\%M-\%S`-cron.log 2>&1