Skip to content

Instantly share code, notes, and snippets.

Avatar

Mark Lee leemark

View GitHub Profile
anonymous
anonymous / a-frame-clock.markdown
Created Apr 18, 2017
a-frame clock
View a-frame-clock.markdown
View customeventpolyfill.js
(function () {
if ( typeof window.CustomEvent === "function" ) return false;
function CustomEvent ( event, params ) {
params = params || { bubbles: false, cancelable: false, detail: undefined };
var evt = document.createEvent( 'CustomEvent' );
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail );
return evt;
}
@addyosmani
addyosmani / LICENSE.txt
Last active Jul 23, 2020 — forked from 140bytes/LICENSE.txt
Offline Text Editor in < 140 bytes (115 bytes). Powered by localStorage & contentEditable
View LICENSE.txt
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Copyright (C) 2014 ADDY OSMANI <addyosmani.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
@leemark
leemark / gist:11237860
Last active Nov 21, 2016
prefixed CSS for slideshow example
View gist:11237860
/* http://themarklee.com/2013/10/16/simple-crossfading-slideshow-css/ */
.css-slideshow {
position: relative;
max-width: 495px;
height: 370px;
margin: 1em auto .5em auto;
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight: 300;
}
.css-slideshow figure {
@arigesher
arigesher / responsive-flickr-embeds
Last active Oct 26, 2020
JQuery code to make Flickr embeds responsive (and resize correctly when loading in a mobile browser). See http://ari.gesher.net/photos-the-gesher-world-tour/ for a working example.
View responsive-flickr-embeds
$(document).ready(function() {
$("#pics iframe").each(function(index) {
var ratio = $(this).height() / $(this).width();
var origHeight = $(this).height();
var origWidth = $(this).width();
var self = this;
// bind to window with closure that references the
// iframe since the iframe doesn't get resize events
// until (you know) we resize it.
$(window).resize(function() {
@leemark
leemark / linktarget.html
Last active Dec 15, 2015
Style in-page link targets using :target. http://codepen.io/leemark/pen/ncLFr
View linktarget.html
<div class="container" id="main">
<nav>
<h1>Navigation</h1>
<ul>
<li><a href="#lorem">Lorem ipsum dolor sit amet.</a></li>
<li><a href="#invenitatis">In venenatis auctor eros sed rhoncus.</a></li>
<li><a href="#utinorci">Ut in orci enim.</a></li>
<li><a href="#donecdiam">Donec diam dolor.</a></li>
<li><a href="#donectortor">Donec tortor mi.</a></li>
</ul>
View quote.md

"There is no sharp line between speculation, hypothesis, theory, principle, and fact, but only a difference along a sliding scale, in the degree of probability of the idea. When we say a thing is a fact, then, we only mean that its probability is an extremely high one: so high that we are not bothered by doubt about it and are ready to act accordingly. Now in this use of the term fact, the only proper one, evolution is a fact."

  • Muller, H. J.
@Mithrandir0x
Mithrandir0x / gist:3639232
Created Sep 5, 2012
Difference between Service, Factory and Provider in AngularJS
View gist:3639232
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@paulmillr
paulmillr / active.md
Last active Feb 27, 2021
Most active GitHub users (by contributions). http://twitter.com/paulmillr
View active.md

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Tue, 06 Dec 2016 17:06:46 GMT till Wed, 06 Dec 2017 17:06:46 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
  .filter(user => user.followers > 1000)