Skip to content

Instantly share code, notes, and snippets.

@bumbu
bumbu / tree_parser.coffee
Last active August 29, 2015 13:56
Keys tree parser
'''
Given input
[
"category:subcategory:item1"
, "category:subcategory:item2"
, "category2:item2"
, "category2:item3"
, "item3"
]
@bumbu
bumbu / gh_contributions.js
Created March 16, 2014 14:26
Allows editing of GitHub contributions graph
$('#calendar-graph').clone().attr('id', 'cg2').insertAfter($('#calendar-graph').hide());
$('#cg2 .day').off('click').click(function(ev){
ev.preventDefault()
ev.stopPropagation()
var $this = $(this)
var colors = ['1e6823', '44a340', '44a340', '8cc665', '8cc665', '8cc665', 'd6e685', 'd6e685', 'd6e685', 'd6e685']
if($this.attr('style') == 'fill: #eeeeee;') {
var color = colors[Math.floor(Math.random() * colors.length)]
@bumbu
bumbu / index.html
Last active August 29, 2015 13:57
Pathvisiojs modularisation
<!DOCTYPE html>
<html>
<head>
<title>Pathvisiojs Demos</title>
<script src="./../dist/lib/jquery/js/jquery.min.js"></script>
<script src="pathvisiojs.js"></script>
<script>
$(function(){
$('#path1').pathvisiojs()
$('#path2').pathvisiojs()
@bumbu
bumbu / child.js
Created May 17, 2014 20:18
Conditional module loading in bower
module.exports = function(a){
console.log('child got '+a)
}
@bumbu
bumbu / keybase.md
Created September 30, 2014 11:15
keybase.md

Keybase proof

I hereby claim:

  • I am bumbu on github.
  • I am bumbu (https://keybase.io/bumbu) on keybase.
  • I have a public key whose fingerprint is 1862 7E4B E09A 9C7A 4C59 DF3A 0CDE FA6F 1C55 E48F

To claim this, I am signing this object:

@bumbu
bumbu / logs.txt
Created November 9, 2014 09:17
Selenium server standalone 2.44.0 debug logs when running intern 2.1.1with firefox
This file has been truncated, but you can view the full file.
Last login: Sun Nov 9 15:48:32 on ttys009
cd % ➜ kuende_front git:(master) ✗ cd ~/Development/Selenium
➜ Selenium java -jar selenium-server-standalone-2.42.2.jar
Nov 09, 2014 5:04:24 PM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
17:04:24.636 INFO - Java: Oracle Corporation 24.51-b03
17:04:24.637 INFO - OS: Mac OS X 10.10 x86_64
17:04:24.646 INFO - v2.42.2, with Core v2.42.2. Built from revision 6a6995d
17:04:24.742 INFO - Default driver org.openqa.selenium.ie.InternetExplorerDriver registration is skipped: registration capabilities Capabilities [{platform=WINDOWS, ensureCleanSession=true, browserName=internet explorer, version=}] does not match with current platform: MAC
17:04:24.783 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444
@bumbu
bumbu / gulpfile.coffee
Created February 26, 2015 10:37
Gulp stylus task
stylus = require 'gulp-stylus'
nib = require 'nib'
gulp.task 'development-style', ->
gulp.src './app/css/style.styl'
.pipe stylus
use: [nib()]
linenos: true
'include css': true
.pipe gulp.dest "./public/css"
@bumbu
bumbu / onD3TransitionsEnd.js
Created September 20, 2015 14:42
A function for triggering a callback at the end of D3.js transitions
/*
Accepts one or more transitions and a callback as last argument
Example:
```
var transition1 = d3.selectAll('g').transition().duration(500)
, transition2 = d3.selectAll('circle').transition().duration(400)
, callback = function() {console.log('done')}
onD3TransitionsEnd(transition1, transition2, callback)
```
@bumbu
bumbu / GMTs of Russia's biggest cities
Created February 6, 2013 18:50
GMT крупных городов России
Абакан 8
Альметьевск 4
Ангарск 9
Арзамас 4
Армавир 4
Артем 4
Архангельск 4
Астрахань 4
Ачинск 8
Балаково 4
@bumbu
bumbu / wm.exchanger.ru data collection
Created March 25, 2013 13:00
Script that gathers data from wm.exchanger.ru. More info here http://wm.exchanger.ru/asp/rules_xml.asp I was running it using a cron job every 3 minutes.
import urllib2
from datetime import date, datetime
import os
# ########################################################
# Definitions
# ########################################################
DIRECTORY = 'ADD HERE OUTPUT DIRECTORY'