Skip to content

Instantly share code, notes, and snippets.

View i-tu's full-sized avatar
🚀
Working on Teamspective

Ian Tuomi i-tu

🚀
Working on Teamspective
View GitHub Profile
// NavigationExperimental CardStack example
// Usage: this.props.dispatch(pushRoute({ key: 'registration' }))
/* ****** */
/* App.js */
/* ****** */
import React, { Component, View } from 'react';
import {
NavigationExperimental,
componentWillReceiveProps(nextProps) {
if (nextProps.lastRequestedUserLocationAt > this.props.lastRequestedUserLocationAt) {
this.centerMapToUser(nextProps.currentLocation);
}
if (nextProps.lastUpdated > this.props.lastUpdated) {
const markers = this.createMarkersForLocations(nextProps);
if (markers && Object.keys(markers)) {
const clusters = {};
# ynanb (You need a Nordea Budget) by Ian Tuomi ([email protected]), MIT Licence
import csv
import datetime
import itertools
def convertDate(nordea_date):
nordea_format = '%d.%m.%Y'
ynab_format = '%m/%d/%Y'
ynab_date = datetime.datetime.strptime(nordea_date, nordea_format).strftime(ynab_format)
@i-tu
i-tu / app.js
Last active December 1, 2015 12:55
Ranking line chart
lineChart("ranking.csv"
, ["#0072C5", "#FFA824", '#E21831', '#3E0605']
, "#example");
function lineChart(filePath, colors, selector) {
var x_column = "Year";
var constructedData;
d3.dsv(";", "text/plain")(filePath, function(error, data) {
data.map(function(d){
@i-tu
i-tu / app.js
Last active December 9, 2015 11:15
Pie chart
var shortData = [{
'Title': 'Kandidaatiksi',
'Value': 18691
}, {
'Title': 'Maisteriksi',
'Value': 9494
}, {
'Title': 'Lisensiaatiksi',
'Value': 235
}, {
;;; haskell-font-lock.el --- Font locking module for Haskell Mode
;; Copyright 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Copyright 1997-1998 Graeme E Moss, and Tommy Thorn
;; Author: 1997-1998 Graeme E Moss <[email protected]>
;; 1997-1998 Tommy Thorn <[email protected]>
;; 2003 Dave Love <[email protected]>
;; Keywords: faces files Haskell
public class EditDist {
public enum METHOD {
KEEP, CHANGE, INSERT, DELETE;
}
private static class Solution {
public int price;
public METHOD method;
public Solution() {}
@i-tu
i-tu / gist:9248658
Last active August 29, 2015 13:56
Instagram-haut
from instagram import client, subscriptions
import urllib2
import sys
CONFIG = {
'client_id': '5b8ae8f010d64112a48f969b6af736d5',
'client_secret': '6cdf09f8c92644f68d6846000880752e',
'redirect_uri': 'http://localhost:8515/oauth_callback'
}
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>