Skip to content

Instantly share code, notes, and snippets.

View Aeon's full-sized avatar
🦴

Anton Stroganov Aeon

🦴
View GitHub Profile
var page = new WebPage(),
address, selector, filename;
var system = require('system');
page.onConsoleMessage = function(msg) {
system.stderr.writeLine('console: ' + msg);
};
//capture and captureSelector functions adapted from CasperJS - https://github.com/n1k0/casperjs
capture = function(targetFile, clips) {
@Aeon
Aeon / _.md
Created February 4, 2015 01:34
d3 box plot
@Aeon
Aeon / gulpfile.js
Created June 3, 2015 19:19
gulp + browserify...
/*
* gulp and site config based on
* http://justinjohnson.org/javascript/getting-started-with-gulp-and-browserify/
* https://gist.github.com/Sigmus/9253068
*
*/
try {
var gulp = require('gulp'),
@Aeon
Aeon / logserver.rb
Last active August 29, 2015 14:27
minimal logserver
require 'sinatra'
logfile = 'log.json'
get '/' do
send_file logfile, :type => :text
end
post '/' do
File.open(logfile, 'a') do |filehandle|
# translation to python for grasshopper
# original: https://gist.github.com/mbostock/22fd67be72552774736d
# import pdb
import numpy
def poissonDiscSampler(width, height, radius):
k = 30 # maximum number of samples before rejection
radius2 = radius * radius
R = 3 * radius2
@Aeon
Aeon / ACME-tiny.md
Last active January 12, 2016 05:28
set up letsencrypt for apache and postfix on rimuhosting

Keybase proof

I hereby claim:

  • I am aeon on github.
  • I am aeontech (https://keybase.io/aeontech) on keybase.
  • I have a public key whose fingerprint is 085A 7C40 1BB8 2E8D 832F A7A6 8344 4866 8E81 E71F

To claim this, I am signing this object:

@Aeon
Aeon / .gitconfig
Created August 20, 2016 21:33
git config
[color]
ui = auto
diff = auto
status = auto
branch = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
@Aeon
Aeon / README.md
Created August 26, 2016 08:34
reddit flair importer
  1. go to https://www.reddit.com/prefs/apps and create a new script app
  2. copy the client_id (short weird string next to app name) and client_secret (long weird string)
  3. insert your mod username, password, client_id and client_secret into praw.ini
  4. create flair.txt file with list of flairs
  5. install praw library with pip install --pre praw
  6. run python flair_import.py
  1. strip beginning/ending single or double quotes
^([^:]*): (?:["'])?(.*?)(?:["'])?$

$1: $2
  1. replace quotes around KEYS with placeholders, if the key has quotes, preserve indents