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 / Клеточки на css - фон
Created November 12, 2016 19:28
Клеточки на css - фон
.tetrad-pattern {
background-image: -webkit-linear-gradient(rgba(0,0,0,0.03) 2px,transparent 2px), -webkit-linear-gradient(0,rgba(0,0,0,0.03) 2px,transparent 2px), -webkit-linear-gradient(rgba(0,0,0,0.03) 1px,transparent 1px), -webkit-linear-gradient(0,rgba(0,0,0,0.03) 1px,transparent 1px);
background-size: 80px 80px, 80px 80px, 5px 5px, 5px 5px;
background-position: -2px -2px, -2px -2px, -1px -1px, -1px -1px;
}
@CB9TOIIIA
CB9TOIIIA / rss-parser.php
Created November 14, 2016 08:39 — forked from bizikov/rss-parser.php
Парсер rss ленты на php
<?php
$orenru = 'http://www.oren.ru/rss/';
$ural56 = 'http://www.ural56.ru/news/news-rss.php';
$oreninform = 'http://oreninform.ru/rss/';
$ru56 = 'http://56.ru/text/rss.xml';
$xml = $orenru;
$rss = simplexml_load_file($xml);
echo '<div class="orenburg-rss-stream"><ul>';
@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
@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 / Сортировка 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 / 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 / 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 / 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 / Костыль link Zoo
Created December 8, 2016 09:12
Костыль link Zoo
@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");