Skip to content

Instantly share code, notes, and snippets.

@soerson
soerson / Preferences.sublime-settings
Last active February 6, 2016 09:47
my sublime text 3 settings
{
"always_show_minimap_viewport": true,
"atomic_save": true,
"bold_folder_labels": true,
"color_scheme": "Packages/Theme - Glacier/glacier.tmTheme",
"font_size": 9,
"ignored_packages":
[
"CSS",
"Markdown",
@soerson
soerson / favicons.jade
Last active October 27, 2015 09:53
favicons.jade
// FAVICON
link(rel="shortcut icon" href="img/favicon/favicon.ico")
link(rel="apple-touch-icon-precomposed" sizes="57x57" href="img/favicon/apple-touch-icon-57x57.png")
link(rel="apple-touch-icon-precomposed" sizes="60x60" href="img/favicon/apple-touch-icon-60x60.png")
link(rel="apple-touch-icon-precomposed" sizes="72x72" href="img/favicon/apple-touch-icon-72x72.png")
link(rel="apple-touch-icon-precomposed" sizes="76x76" href="img/favicon/apple-touch-icon-76x76.png")
link(rel="apple-touch-icon-precomposed" sizes="114x114" href="img/favicon/apple-touch-icon-114x114.png")
link(rel="apple-touch-icon-precomposed" sizes="120x120" href="img/favicon/apple-touch-icon-120x120.png")
link(rel="apple-touch-icon-precomposed" sizes="144x144" href="img/favicon/apple-touch-icon-144x144.png")
link(rel="apple-touch-icon-precomposed" sizes="152x152" href="img/favicon/apple-touch-icon-152x152.png")
@soerson
soerson / openWithST3.bat
Created January 4, 2016 17:23
Add "Open with Sublime Text 3" to files/folders context menu
@echo off
SET st3Path=C:\Program Files\Sublime Text 3\sublime_text.exe
rem add it for all file types
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3" /t REG_EXPAND_SZ /v "Icon" /d "%st3Path%,0" /f
@reg add "HKEY_CLASSES_ROOT\*\shell\Open with Sublime Text 3\command" /t REG_SZ /v "" /d "%st3Path% \"%%1\"" /f
rem add it for folders
@reg add "HKEY_CLASSES_ROOT\Folder\shell\Open with Sublime Text 3" /t REG_SZ /v "" /d "Open with Sublime Text 3" /f
@soerson
soerson / sublime sync
Last active January 18, 2016 09:17
sublime sync on windows https://goo.gl/kCdJUh
// first time
cd "$env:appdata\Sublime Text 3\Packages\"
mkdir $env:userprofile\Dropbox\Sublime
mv User $env:userprofile\Dropbox\Sublime\
cmd /c mklink /D User $env:userprofile\Dropbox\Sublime\User
// other machines
cd "$env:appdata\Sublime Text 3\Packages\"
rmdir -recurse User
@soerson
soerson / clearfix.scss
Last active February 16, 2016 12:27
SCSS: clearfix
%clearfix {
*zoom: 1;
&:after {
content: '';
display: table;
line-height: 0;
clear: both;
}
}
@soerson
soerson / currency.scss
Created February 16, 2016 10:23
SCSS: currency
%currency {
position: relative;
&:before {
content: '$';
position: relative;
left: 0;
}
}
.USD %currency:before { content: '$'; }
.EUR %currency:before { content: '\20AC'; } // must escape the html entities for each currency symbol
@soerson
soerson / ghostVerticalAlign.scss
Created February 16, 2016 10:24
SCSS: ghostVerticalAlign
@mixin ghostVerticalAlign(){
&:before {
content: '';
display: inline-block;
vertical-align: middle;
height: 100%; width: .1px;
}
}
@soerson
soerson / soc-colors.scss
Created February 17, 2016 12:57
SCSS: social colors via sass-map
$soc-colors-settings: (
tw: #00b6f3,
fb: #3b5998,
in: #2086bc,
gp: #cf4231,
vk: #5f7fa2,
);
.item {
@each $name, $color in $soc-colors-settings {
@soerson
soerson / triangle.scss
Created February 17, 2016 21:40
SCSS: triangle
@mixin triangle($direction, $size: 6px, $color: #222){
@if ($direction == 'up'){
border-bottom: $size solid $color;
border-left: 1/2*$size solid transparent;
border-right: 1/2*$size solid transparent;
}
@else if ($direction == 'down'){
border-top: $size solid $color;
border-left: 1/2*$size solid transparent;
border-right: 1/2*$size solid transparent;
@soerson
soerson / justifyHorAlign.scss
Last active February 18, 2016 10:44
SCSS: horizontal align via justify
@mixin justifyHorAlign($ver-align: top, $item-align: left) {
text-align: justify;
&::after {
width: 100%;
content: "";
display: inline-block;
}
& > * {