Skip to content

Instantly share code, notes, and snippets.


Horia Dragomir hdragomir

View GitHub Profile
frontendbeast / sm-annotated.html
Last active Jun 25, 2020 — forked from hdragomir/sm-annotated.html
The deferred font loading logic for Smashing Magazine, updated to include IE8 support.
View sm-annotated.html
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
willurd /
Last active Aug 19, 2022
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
View gist:1285068
Hi David,
I came across your profile online and wanted to reach out about Development
Opportunities here at Groupon. The company is growing, and we're always
looking for folks with solid skills that can make positive contribution to
our continued success. Any chance you'd be open to a quick conversation
about opportunities, or for any possible networking potential? If so, let me
know when you're free and we can set up a time to chat. Also, if you are
interested, it would be great if you could forward a current resume over
that I can take a look at. I look forward to hearing back from you! Please
let me know if you have any questions.
hdragomir / $.fn.hint.js
Created Mar 18, 2011
simple input hint plugin
View $.fn.hint.js
$.fn.hint = function(hint){
var val = $(this).eq(0).bind('focus', function(){
if($(this).val() == hint) $(this).val('');
}).bind('blur', function(){
if($(this).val() == '') $(this).addClass('hinting').val(hint);
}).bind('change', function(){
if(! /\S/.test(val)) $(this).eq(0).val(hint).addClass('hinting');