Skip to content

Instantly share code, notes, and snippets.

View valueof's full-sized avatar
👋

Anton valueof

👋
View GitHub Profile
@valueof
valueof / user.behaviors.clj
Last active January 4, 2016 18:49
LightTable Configuration
;; https://gist.github.com/antonkovalyov/8663025
{:+ {
;; The app tag is kind of like global scope. You assign behaviors that affect
;; all of Light Table here
:app [(:lt.objs.style/set-skin "light")]
;; The editor tag is applied to all editors
:editor [:lt.objs.editor/no-wrap
(:lt.objs.style/set-theme "solarized-light")
@valueof
valueof / gist:5111400
Last active December 14, 2015 15:58
M.a.a.d City / Code Version
Original lyrics: http://rapgenius.com/Kendrick-lamar-maad-city-lyrics
If Node peeps and Crock all got along
They'd probably gun me down by the end of this song
--
Seem like the whole codebase go against me
Every time I run my tests I hear
BUG BUG BUG BUG
@hzr
hzr / gist:3183910
Created July 26, 2012 19:15
Check for Opera bug with nested redirected calls
var hasWorkingNestedRedirectedCalls = (function () {
function f(a) { return function() { return a.apply(this, arguments); }}
var g1 = f(function(a) { return a; });
var g2 = new g1(g1);
return typeof g2 == "function";
})();
@valueof
valueof / view.fatarrows.js
Created June 6, 2012 00:50
Backbone view that initializes a third-party JavaScript app, attaches a couple of listeners and sends a signal back to the parent page: with and without fat arrows.
var Lounge = Backbone.View.extend({
initialize: function (options) {
// ...
Bus.listen('window.inViewport', () => {
this.states.inViewport = true;
this.trigger('inViewport');
});
Bus.listen('window.scrollOffViewport', () => {
@valueof
valueof / disqus_events.js
Created July 12, 2010 18:24
Description and examples for Disqus events
var disqus_config = function () {
var config = this; // Access to the config object
/*
All currently supported events:
* preData fires just before we request for initial data
* preInit - fires after we get initial data but before we load any dependencies
* onInit - fires when all dependencies are resolved but before dtpl template is rendered
* afterRender - fires when template is rendered but before we show it
* onReady - everything is done
@valueof
valueof / comments-count-sample.html
Created July 8, 2010 08:37
Comments count code example
<html>
<head>
<title>Comments count code example</title>
<!--
Note: Disqus uses custom data- attributes to specify thread identifiers.
Those attributes are part of the HTML5 specs and already supported by all browsers.
For more information, see:
* http://ejohn.org/blog/html-5-data-attributes/