Skip to content

Instantly share code, notes, and snippets.

View Zlatov's full-sized avatar
:octocat:

Maksim Zlatov Zlatov

:octocat:
View GitHub Profile
@Zlatov
Zlatov / yiiSessionOpen.sublime-snippet
Last active August 2, 2016 15:08
yiiSessionOpen.sublime-snippet
<snippet>
<content><![CDATA[
\$session = Yii::\$app->session;
if (!\$session->isActive) {
\$session->open();
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>yiiSessionOpen</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@Zlatov
Zlatov / yiiinput.sublime-snippet
Last active July 18, 2016 09:20
snippet-yiiinput
<snippet>
<content><![CDATA[
<input type="hidden" name="_csrf" value="<?=Yii::\$app->request->getCsrfToken()?>" />
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>yiiinput</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.html</scope> -->
</snippet>
@Zlatov
Zlatov / itemOfArray.sublime-snippet
Last active June 6, 2016 16:46
sublime-snippet-itemOfArray
<snippet>
<content><![CDATA[
'${1:this}' => '${2:snippet}',
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>i</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
@Zlatov
Zlatov / print_r.sublime-snippet
Last active August 9, 2016 11:17
print_r-sublime-snippets
<snippet>
<content><![CDATA[
echo "<pre>";
print_r(\$${1:this});
echo "</pre>";
die();
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>???</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@Zlatov
Zlatov / echo.sublime-snippet
Last active June 4, 2016 08:34
sublime-snippet-echo
<snippet>
<content><![CDATA[
<?= ${1:} ?>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>??</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
<style type="text/css">
html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background:0 0}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1
@Zlatov
Zlatov / css-footer-always-bottom.css
Last active August 29, 2015 14:08
css footer always bottom
@Zlatov
Zlatov / htaccess
Last active January 15, 2016 14:33
htaccess
# #####################
# ## ##
# ## Кодировка ##
# ## ##
# #####################
# Кодировка
#AddDefaultCharset UTF-8
# Если mod_charset есть на сервере
@Zlatov
Zlatov / css ul li bullets float left
Last active August 29, 2015 14:04
css ul li bullets float left
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div style="float: left; width: 50px; height: 200px; background-color:red; margin-right: 10px;"></div>
<p>Lorem ipsum dolor.</p>
<ul>