Instantly share code, notes, and snippets.

View :visited.js
localStorage.setItem('visited-'+window.location.pathname,true);
var links = document.getElementsByTagName('a');
for (i=0;i<links.length;i++) {
var link = links[i];
if (link.host == window.location.host
&& localStorage.getItem('visited-' + link.pathname + '/')) {
link.dataset.visited = true;
}
}
View flexbox.css
.parent {
display: flex;
height: 500px;
}
.child {
max-width: 20em;
margin: auto;
border: solid 1px;
}
View Preferences.sublime-settings
{
"auto_complete_commit_on_tab": true,
"color_scheme": "Packages/Color Scheme - Default/Tomorrow-Night-Eighties.tmTheme",
"file_exclude_patterns":
[
".DS_Store"
],
"folder_exclude_patterns":
[
"bin",
View style.css
/*** GLOBAL ***/
/**************/
img, embed, object, video {
max-width: 100%;
}
@font-face {
font-family: 'sicanstudios-icons';
src:url('./fonts/sicanstudios-icons.eot');
}
View recent-posts.html
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load("feeds", "1");
google.setOnLoadCallback(OnLoad);
/* creates a feed instance and loads the feed */
function OnLoad() {
var feed = new google.feeds.Feed("http://scriptogr.am/sican/feed/");
feed.load(feedLoaded);
}
View retina-media-query.css
/* future proof retina targetting */
@media (-webkit-min-device-pixel-ratio: 1.5), (min--moz-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 144dpi), (min-resolution: 1.5dppx), {
}
View fadein-scroll.js
$(document).ready(function() {
/* Every time the window is scrolled ... */
$(window).scroll( function(){
/* Check the location of each desired element */
$('.hideme').each( function(i){
var bottom_of_object = $(this).position().top + $(this).outerHeight();
var bottom_of_window = $(window).scrollTop() + $(window).height();
/* If the object is completely visible in the window, fade it it */
if( bottom_of_window > bottom_of_object ){
View keyboard-keys.js
$(document).on('keydown', function(e) {
if (e.keyCode >= 65 && e.keyCode <= 90) {
var char = (e.metaKey ? '⌘-' : '') + String.fromCharCode(e.keyCode)
$('#keydown').append('<kbd>' + char + '</kbd>')
e.preventDefault();
}
});
View index.html
<!doctype html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<link rel="shortcut icon" href="favicon.png" />
<title>Account Menu Dropdown &#8211; CSS3 &amp; HTML5 experiment</title>
<meta name="description" content="Card flip | SicanStudios.com">
<meta name="author" content="http://SicanStudios.com">
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<link href='http://fonts.googleapis.com/css?family=PT+Sans' rel='stylesheet' type='text/css'>
View movies-series.md

FAVOURITE MOVIES

4 Months, 3 Weeks and 2 Days
12 Angry Men
28 Days Later
127 Hours
A Beautiful Mind
A Clockwork Orange
A Separation