Skip to content

Instantly share code, notes, and snippets.

@oboshto
oboshto / .csscomb.json
Created April 28, 2017 09:19
csscomb config
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"eof-newline": false,
"leading-zero": false,
"quotes": "double",
@oboshto
oboshto / jsCodeStyle.xml
Last active April 13, 2017 10:24
javascript code style
<code_scheme name="Project">
<option name="HTML_SPACE_INSIDE_EMPTY_TAG" value="true" />
<JSCodeStyleSettings>
<option name="FORCE_SEMICOLON_STYLE" value="true" />
<option name="SPACE_BEFORE_FUNCTION_LEFT_PARENTH" value="false" />
<option name="USE_DOUBLE_QUOTES" value="false" />
<option name="FORCE_QUOTE_STYlE" value="true" />
<option name="ENFORCE_TRAILING_COMMA" value="Remove" />
<option name="VAR_DECLARATION_WRAP" value="2" />
<option name="SPACES_WITHIN_IMPORTS" value="true" />
@oboshto
oboshto / reset.css
Created April 12, 2017 08:44
css isolation reset
.reset {
background:none;
border:none;
bottom:auto;
clear:none;
cursor:default;
float:none;
font-size:medium;
font-style:normal;
font-weight:normal;
@oboshto
oboshto / textAnimations.css
Created March 24, 2017 11:34
Colored text via gradient with animation
.text{
background: -webkit-linear-gradient(right, #26bf98, #2695bf);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-size: 400% 400%;
animation: bg-animation 3s ease infinite;
}
@keyframes bg-animation {
@oboshto
oboshto / moods.js
Created March 24, 2017 09:21
all moods
['STUDYING',
'CALM',
'PIANO',
'HAPPY',
'CLASSICAL',
'DREAMY',
'GROOVY',
'SEXY',
'JUST WOKE UP',
'SECOND CHANCE',
@oboshto
oboshto / emojis.md
Created March 23, 2017 16:35
full list of emoji
emoji aliases tags
๐Ÿ‘ :+1:, :thumbup:, :thumbsup: thumbs, up, sign, body, hands, hi, luck, thank, you, diversity, diversity, perfect, perfect, good, good, beautiful, beautiful
๐Ÿ‘๐Ÿป :+1_tone1:, :thumbup_tone1:, :thumbsup_tone1: thumbs, up, sign, tone, 1
๐Ÿ‘๐Ÿผ :+1_tone2:, :thumbup_tone2:, :thumbsup_tone2: thumbs, up, sign, tone, 2
๐Ÿ‘๐Ÿฝ :+1_tone3:, :thumbup_tone3:, :thumbsup_tone3: thumbs, up, sign, tone, 3
๐Ÿ‘๐Ÿพ :+1_tone4:, :thumbup_tone4:, :thumbsup_tone4: thumbs, up, sign, tone, 4
๐Ÿ‘๐Ÿฟ :+1_tone5:, :thumbup_tone5:, :thumbsup_tone5: thumbs, up, sign, tone, 5
๐Ÿ‘Ž :-1:, :thumbdown:, :thumbsdown: thumbs, down, sign, body, hands, diversity, diversity
๐Ÿ‘Ž๐Ÿป :-1_tone1:, :thumbdown_tone1:, :thumbsdown_tone1: thumbs, down, sign, tone, 1
@oboshto
oboshto / scrollProgress.js
Last active March 23, 2017 16:36
A little progress bar for scrolling
function setProgress() {
let bar = document.querySelector('.js-content-bar'),
content = document.body,
max = content.scrollHeight - window.innerHeight,
progressValue = content.scrollTop / max * 100;
bar.setAttribute('value', progressValue);
}
window.addEventListener('scroll', setProgress);
@oboshto
oboshto / vk.ad_loaded.js
Created February 8, 2017 17:10
vk ad loaded callback
VK.Widgets.Ads('vk_ads_id', {
onAdsReady: function() {
console.log('ad loaded');
}}, adsParams);
@oboshto
oboshto / copyFake.js
Last active February 2, 2017 12:46
Replace copied selection
function fakeCopy () {
let selection = window.getSelection();
let fakeDiv = document.createElement('div');
fakeDiv.innerHTML = 'COPIED SELECTION REPLACED';
fakeDiv.style.position = 'absolute';
fakeDiv.style.top = '-999999px';
document.body.appendChild(fakeDiv);
selection.selectAllChildren(fakeDiv);
window.setTimeout(function () {
document.body.removeChild(fakeDiv);
@oboshto
oboshto / dateperiod.php
Created February 2, 2017 10:57
Just an example to include the end date using the DateTime method 'modify'
<?php
$begin = new DateTime( '2012-08-01' );
$end = new DateTime( '2012-08-31' );
$end = $end->modify( '+1 day' );
$interval = new DateInterval('P1D');
$daterange = new DatePeriod($begin, $interval ,$end);
foreach($daterange as $date){