Skip to content

Instantly share code, notes, and snippets.

View slovyagin's full-sized avatar

Bogdan Slovyagin slovyagin

  • Budapest, Hungary
View GitHub Profile
@slovyagin
slovyagin / fixlogin.sh
Created August 30, 2017 13:48
Turning Off “Reopen windows when logging back in” by Making it Useless
#!/bin/bash
echo "#!/bin/bash" > /tmp/loginfix.sh
echo "rm /Users/*/Library/Preferences/ByHost/com.apple.loginwindow.*" >> /tmp/loginfix.sh
mv /tmp/loginfix.sh /usr/bin/loginfix.sh
chmod +x /usr/bin/loginfix.sh
defaults write com.apple.loginwindow LoginHook /usr/bin/loginfix.sh
sudo chown -R $(whoami) /usr/local/lib/node_modules/
export PATH=./node_modules/.bin:$PATH
@slovyagin
slovyagin / shaking
Created March 3, 2015 11:03
Error shaking
@keyframes animation-shake {
8%, 41% {
transform: translateX(-10px);
}
25%, 58% {
transform: translateX(10px);
}
75% {
transform: translateX(-5px);
}
@slovyagin
slovyagin / clean
Created February 24, 2015 10:55
git: Clean local changes
git clean -fd
@slovyagin
slovyagin / countries
Created February 9, 2015 08:30
Lower-case ISO country list
['ad', 'ae', 'af', 'ag', 'ai', 'al', 'am', 'ao', 'aq', 'ar', 'as', 'at', 'au', 'aw', 'ax', 'az', 'ba', 'bb', 'bd', 'be', 'bf', 'bg', 'bh', 'bi', 'bj', 'bl', 'bm', 'bn', 'bo', 'bq', 'br', 'bs', 'bt', 'bv', 'bw', 'by', 'bz', 'ca', 'cc', 'cd', 'cf', 'cg', 'ch', 'ci', 'ck', 'cl', 'cm', 'cn', 'co', 'cr', 'cu', 'cv', 'cw', 'cx', 'cy', 'cz', 'de', 'dj', 'dk', 'dm', 'do', 'dz', 'ec', 'ee', 'eg', 'eh', 'er', 'es', 'et', 'fi', 'fj', 'fk', 'fm', 'fo', 'fr', 'ga', 'gb', 'gd', 'ge', 'gf', 'gg', 'gh', 'gi', 'gl', 'gm', 'gn', 'gp', 'gq', 'gr', 'gs', 'gt', 'gu', 'gw', 'gy', 'hk', 'hm', 'hn', 'hr', 'ht', 'hu', 'id', 'ie', 'il', 'im', 'in', 'io', 'iq', 'ir', 'is', 'it', 'je', 'jm', 'jo', 'jp', 'ke', 'kg', 'kh', 'ki', 'km', 'kn', 'kp', 'kr', 'kw', 'ky', 'kz', 'la', 'lb', 'lc', 'li', 'lk', 'lr', 'ls', 'lt', 'lu', 'lv', 'ly', 'ma', 'mc', 'md', 'me', 'mf', 'mg', 'mh', 'mk', 'ml', 'mm', 'mn', 'mo', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'mv', 'mw', 'mx', 'my', 'mz', 'na', 'nc', 'ne', 'nf', 'ng', 'ni', 'nl', 'no', 'np', 'nr', 'nu', 'nz
@slovyagin
slovyagin / chrome-win-font.css
Last active August 29, 2015 14:06
Font fix for Google Chrome on Windows
@font-face {
font-family: 'MyFont';
src: url('fonts/myfont.eot');
src: url('fonts/myfont.eot?#iefix') format('embedded-opentype'),
url('fonts/myfont.woff') format('woff'),
url('fonts/myfont.ttf') format('truetype'),
url('fonts/myfont.svg#myfont') format('svg');
font-weight: normal;
font-style: normal;
}
@slovyagin
slovyagin / crossing
Last active August 29, 2015 14:03
SVG: Crossed box
<svg xmlns="http://www.w3.org/2000/svg"><line stroke="#f00" stroke-width="8" stroke-miterlimit="10" x1="4" y1="99%" x2="99%" y2="4" fill="none"/></svg>
@slovyagin
slovyagin / ie-cond.slim
Last active August 29, 2015 14:02 — forked from helloluis/Slim HTML5 Boilerplate Conditional Comments
Slim: IE Conditional Comments
doctype html
/[if lt IE 7]
| <html class="ie6">
/[if IE 7]
| <html class="ie7">
/[if IE 8]
| <html class="ie8">
/[if IE 9]
| <html class="ie9">
| <!--[if (gte IE 9)|!(IE)]<!--> <html> <!--<![endif]-->
@slovyagin
slovyagin / gist:ce65434d650ab5d201ec
Created June 16, 2014 15:26
Get rid of Dropbox conflicted copies
find ~/Dropbox/ -path "*(*'s conflicted copy [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*" -exec rm -f {} \;
find ~/Dropbox/ -path "*(*'s conflicted copy [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]*" -print