Skip to content

Instantly share code, notes, and snippets.

View alexissmirnov's full-sized avatar

Alexis Smirnov alexissmirnov

View GitHub Profile
<!DOCTYPE html>
<meta charset="utf-8">
<canvas width="960" height="500"></canvas>
<script>
/* https://github.com/d3/d3-timer Copyright 2015 Mike Bostock */
"undefined"==typeof requestAnimationFrame&&(requestAnimationFrame="undefined"!=typeof window&&(window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.oRequestAnimationFrame)||function(e){return setTimeout(e,17)}),function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(e.timer={})}(this,function(e){"use strict";function n(){r=m=0,c=1/0,t(u())}function t(e){if(!r){var t=e-Date.now();t>24?c>e&&(m&&clearTimeout(m),m=setTimeout(n,t),c=e):(m&&(m=clearTimeout(m),c=1/0),r=requestAnimationFrame(n))}}function i(e,n,i){i=null==i?Date.now():+i,null!=n&&(i+=+n);var o={callback:e,time:i,flush:!1,next:null};a?a.next=o:f=o,a=o,t(i)}function o(e,n,t){t=null==t?Date.now():+t,null!=n&&(t+=+n),l.callback=e,l.time=t}function u(e){e=null==e?D
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.bar rect {
fill: steelblue;
var http = require('http');
var url = require('url');
http.createServer(function (request, response) {
var body = 'Request is :' + request;
var postData = '';
request.on('data', function (chunk) {
postData += chunk;
});
@alexissmirnov
alexissmirnov / data.tsv
Last active August 29, 2015 14:19
Testing multi-file gists
letter frequency
A .08167
B .01492
C .02782
D .04253
E .12702
F .02288
G .02015
H .06094
I .06966
@alexissmirnov
alexissmirnov / Vagrantfile
Last active January 1, 2016 23:09
This Vagrant file results in the error log: "No guest IP was given to the Vagrant core NFS helper. This is an internal error that should be reported as a bug."
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
(1..2).each do |i|
config.vm.define vm_name = "core-%02d" % i do |config|
config.vm.box = "coreos"
@alexissmirnov
alexissmirnov / gist:1171273
Created August 25, 2011 17:47
iA Writer Crash
Process: iA Writer [36813]
Path: /Applications/iA Writer.app/Contents/MacOS/iA Writer
Identifier: jp.informationarchitects.WriterForMacOSX
Version: 1.1 (1.1)
App Item ID: 439623248
App External ID: 4045871
Code Type: X86-64 (Native)
Parent Process: launchd [156]
Date/Time: 2011-08-25 13:45:38.217 -0400
App.Contact.objects().filter({varotite: YES},
function(contacts) {
sendMessage(contacts);
}
);
onClickSendMessageToFavoriteContacts: function() {
var favoriteContacts = App.store.find(App.favoriteContactsQuery);
favoriteContacts.forEach(function(contact) {
App.sendSomeMessage(contact);
});
}
view = App.ContactsView.design({
contentBinding : 'App.contactsController.arrangedObjects'
});
App.contactsState = SC.Responder.create( {
didBecomeFirstResponder : function() {
var records = App.store.find(App.contactsQuery);
App.contactsController.set('content', records);
}
});