Skip to content

Instantly share code, notes, and snippets.

View silo's full-sized avatar
🥷

Silo silo

🥷
View GitHub Profile
@silo
silo / Browser-detect.js
Created August 24, 2017 08:54
Browser detect
// Opera 8.0+
var isOpera = (!!window.opr && !!opr.addons) || !!window.opera || navigator.userAgent.indexOf(' OPR/') >= 0;
// Firefox 1.0+
var isFirefox = typeof InstallTrigger !== 'undefined';
// Safari 3.0+ "[object HTMLElementConstructor]"
var isSafari = /constructor/i.test(window.HTMLElement) || (function (p) { return p.toString() === "[object SafariRemoteNotification]"; })(!window['safari'] || safari.pushNotification);
// Internet Explorer 6-11
@silo
silo / babun-Hyper-Win.md
Last active May 24, 2023 02:20
Babun + Hyper + Windows - Setup
@silo
silo / get_previous_sibling.html
Last active February 28, 2017 11:35
CSS: get previous sibling
<a href="#">test</a>
<a href="#" class="active">test</a>
<a href="#">test</a>
<p>
test
</p>
<img class="image" src="http://placehold.it/350x150">
<style>
@silo
silo / 0_reuse_code.js
Last active August 29, 2015 14:23
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@silo
silo / dabblet.css
Created November 6, 2012 09:04
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;<label><input type="checkbox">Hey</label>
<label><input type="checkbox">Hey</label>