Skip to content

Instantly share code, notes, and snippets.

View fr33z3's full-sized avatar

Sergei Gribovskii fr33z3

  • Freelance
  • Berlin, Germany
View GitHub Profile
@pbojinov
pbojinov / jquery.document.ready.js
Last active August 30, 2018 10:56
document ready extracted from jQuery source
/**
* Minified version
* 1.14KB (377 bytes gzipped)
*
* (function(){var documentIsReady=false;function documentReadyHandler(fn){if(!documentIsReady){documentIsReady=true;if(document.addEventListener)document.removeEventListener("DOMContentLoaded",function(){documentReadyHandler(fn)},false);else if(document.attachEvent)if(document.readyState=="complete")document.detachEvent("onreadystatechange",function(){documentReadyHandler(fn)});fn()}}function documentReady(fn){if(document.addEventListener){document.addEventListener("DOMContentLoaded",function(){documentReadyHandler(fn)},false);window.addEventListener("load",function(){documentReadyHandler(fn)},false)}else if(document.attachEvent){document.attachEvent("onreadystatechange",function(){documentReadyHandler(fn)});window.attachEvent("onload",function(){documentReadyHandler(fn)});var toplevel=false;try{toplevel=window.frameElement==null}catch(e){}if(document.documentElement.doScroll&&toplevel)doScrollCheck(function(){documentReadyHandler(fn)})}}function doSc
@gbuesing
gbuesing / ml-ruby.md
Last active February 28, 2024 15:13
Resources for Machine Learning in Ruby

UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!

Resources for Machine Learning in Ruby

Gems

@hfreire
hfreire / qemu_osx_rpi_raspbian_jessie.sh
Last active March 24, 2024 14:35
How to emulate a Raspberry Pi (Raspbian Jessie) on Mac OSX (El Capitan)
# Install QEMU OSX port with ARM support
sudo port install qemu +target_arm
export QEMU=$(which qemu-system-arm)
# Dowload kernel and export location
curl -OL \
https://github.com/dhruvvyas90/qemu-rpi-kernel/blob/master/kernel-qemu-4.1.7-jessie
export RPI_KERNEL=./kernel-qemu-4.1.7-jessie
# Download filesystem and export location