Skip to content

Instantly share code, notes, and snippets.

@mtrovo
mtrovo / 10m.json
Last active October 7, 2018 09:45
Brazil TopoJSON
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mtrovo
mtrovo / .vimrc
Created August 2, 2017 09:26
my vim-go mappings
" run :GoBuild or :GoTestCompile based on the go file
function! s:build_go_files()
let l:file = expand('%')
if l:file =~# '^\f\+_test\.go$'
call go#cmd#Test(0, 1)
elseif l:file =~# '^\f\+\.go$'
call go#cmd#Build(0)
endif
endfunction
@mtrovo
mtrovo / Pipfile
Created April 3, 2017 10:35
N26 transactions to YNAB CSV format
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
[packages]
n26 = "*"
pynynab = "*"
sqlalchemy = "*"
@mtrovo
mtrovo / create_topics.sh
Created March 21, 2017 13:10
Create topics on nakadi for business events
MINT_BUCKET=zalando-stups-mint-200641888568-eu-west-1
PROJECT=user-management
TEAM_PACKAGE=solution_center
STAGING_URL="https://nakadi-staging.aruha-test.zalan.do/event-types"
PROD_URL="https://nakadi-live.aruha.zalan.do/event-types"
gradle clean build generateEventTypes
cd build/event-types
cd $TEAM_PACKAGE
<html>
<body>
<img src="http://dogr.io/wow/suchreactive/muchintegrations/verywebscale/datgooddata.png" />
<script src="https://www.gstatic.com/firebasejs/3.2.0/firebase.js"></script>
<script>
var img = document.getElementsByTagName("img")[0];
Object.values = obj => Object.keys(obj).map(key => obj[key]);
// Initialize Firebase
var config = {
apiKey: "AIzaSyDWXUtdcIG5N-XKk1TAXPn5xOLaUMuwHUQ",
@mtrovo
mtrovo / oslogs
Created September 23, 2015 16:17
#!/usr/bin/env bash
channel=$1
if [ -z "$2" ]; then
date=`date +%Y-%m-%d`
else
date=$2
fi
curl -s "http://eavesdrop.openstack.org/irclogs/%23$channel/%23$channel.$date.log" | iconv -f utf-8 | grep -vF "***"
@mtrovo
mtrovo / index.html
Last active January 2, 2016 03:28
Drill down pie chart with D3
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script>
var width = 960,
height = 500,
radius = Math.min(width, height) / 2,
donut_width=radius/3;
@mtrovo
mtrovo / macanudo_del_dia.rb
Last active January 1, 2016 13:09
Wallpaper downloader for Ubuntu to the last Macanudo comics from the website http://www.macanudo.com.ar. Tested in Ubuntu 13.04. Run with --help to see some more options.
#!/usr/bin/env ruby
require 'open-uri'
require 'nokogiri'
require 'RMagick'
include Nokogiri
include Magick
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mtrovo
mtrovo / SelfReplicant.java
Created January 16, 2013 03:02
Self replicant java program for Thursday Code Puzzler of DZone
package mtrovo;
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.RandomStringUtils;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang.StringUtils;