Skip to content

Instantly share code, notes, and snippets.

@neocris
neocris / gist:3911806
Created October 18, 2012 13:29
Cycling in URSS
{"ndoc": "10", "snippets": [{"title": "Cycling in USSR", "type": "fluid", "img": {"src": "img/giro83-2.jpg", "caption": "Pure climbers, Voloshin (44) and Demidenko (45) in action at the 1983 amateur Giro.", "meta": {"source": "", "license": ""}}, "lead": "A page about soviet-era cycling", "tags": ["cycling", "urss"], "docs": ["10"]}]}
@neocris
neocris / README.md
Last active December 20, 2015 21:39 — forked from evandrix/README.md

Here are a list of headless browsers that I know about:

  • [HtmlUnit][1] - Java. Custom browser engine. JavaScript support/DOM emulated. Open source.
  • [Ghost][2] - Python only. WebKit-based. Full JavaScript support. Open source.
  • [Twill][3] - Python/command line. Custom browser engine. No JavaScript. Open source.
  • [PhantomJS][4] - Command line/all platforms. WebKit-based. Full JavaScript support. Open source.
  • [Awesomium][5] - C++/.Net/all platforms. Chromium-based. Full JavaScript support. Commercial/free.
  • [SimpleBrowser][6] - .Net 4/C#. Custom browser engine. No JavaScript support. Open source.
  • [ZombieJS][7] - Node.js. Custom browser engine. JavaScript support/emulated DOM. Open source.
  • [EnvJS][8] - JavaScript via Java/Rhino. Custom browser engine. JavaScript support/emulated DOM. Open source.
@neocris
neocris / snippets.md
Last active December 28, 2019 12:30
code snippets

iterate over all user global functions

	for (w in window){if (window.hasOwnProperty(w) && typeof window[w] === 'function'){}}

convert NodeList to Array (http://davidwalsh.name/nodelist-array)

	var nodesArray = [].slice.call(document.querySelectorAll("div"));
String.prototype.hashCode = function(){
var hash = 0;
if (this.length == 0) return hash;
for (i = 0; i < this.length; i++) {
char = this.charCodeAt(i);
hash = ((hash<<5)-hash)+char;
hash = hash & hash; // Convert to 32bit integer
}
return hash;
}
@neocris
neocris / README.md
Last active August 29, 2015 14:07 — forked from addyosmani/README.md

CSS Layout Debugger

A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.

One-line version to paste in your DevTools

Use $$ if your browser aliases it:

~ 108 byte version

space:ui Build Status

Meteor UI framework inspired by React and Flux.

Installation

meteor add space:ui

TodoMVC Example

If you want to know if space:ui could be interesting, take a look at the TodoMVC example

Alkali

Join the chat at https://gitter.im/alkali-js/Lobby Build Status devDependency status

Alkali is a package for creating efficient, reactive data flow that drives native HTML elements. The namesake, alkali metals are a set of elements known for being extremely reactive, conductive, and lightweight, and likewise this library is designed to be a lightweight (20KB gzipped), dependency-free package for accessing simple pure native JavaScript objects with modeling and reactivity capabilities, and creating reactive UIs based on native DOM elements. Alkali is designed to be for speed and scalability, usin

@neocris
neocris / index.htm
Created June 8, 2017 20:19 — forked from anonymous/index.htm
module_loader
<!doctype html>
<html class="no-js" lang="">
<head>
<script>
/**
* poc for various polyfills to use js modules
* [head.js](#head)
* [require.js](#require)
import Data.Monoid (Monoid, (<>))
-- writer monad. is a way to put a monad structure on tuples
-- see https://wiki.haskell.org/Monoid#On_the_Writer_monad
{-
(w,x) >>= f =
case f x of
(v, y) -> (w <> v, y)
-}
-- the monoidal instance of tuple/product allows accumulating -<>- successive 'logs' -a<>c- for each computation -gx,fb
@neocris
neocris / gist:d0a7a0fe20d324b6f4ced8da546de7d4
Created November 20, 2018 19:55 — forked from nnja/gist:9136152c163091614e70defcf3753d06
How to access the raw markdown source for a github wiki page
https://raw.github.com/wiki/user/repo/page.md?login=login&token=token