Skip to content

Instantly share code, notes, and snippets.

@killercup
killercup / Readme.md
Last active August 29, 2015 13:56
Browserify Structure

Client Side Module System

Goal: Use some modules (React components) on client side and server

Directory Structure

/client/
  app.coffee
  routes.coffee # backbone.Router
@killercup
killercup / Reporter.md
Created February 7, 2014 20:14
Questions and Ideas for reporter-app.com

Personal Reporter App

Workflow

  • Random questions at random times
  • iOS App
  • Import
    • Mac on/off
    • Mac key presses
  • iTunes
@killercup
killercup / Readme.md
Last active August 29, 2015 13:56
Technology to try out for report analysis
@killercup
killercup / shit.coffee
Created February 24, 2014 16:08
Replacing brackets with CoffeeScript
Post
.findOne _id: id, 'public': true, 'accepted': true
.populate path: '_team', select: 'name'
.populate path: '_user', select: 'name'
.populate path: 'comments._user', select: 'name _team'
.populate path: 'likes._user', select: 'name _team'
.exec()
@killercup
killercup / mongodb.js
Created March 4, 2014 16:15
Mongodb ObjectId Filter for Angular
angular.module('rm.MongoDB', [])
/**
* @method Object ID to Date
* @param {String} objectID The Object ID as String
* @return {Date} Creation Date of ObjectId
*/
.filter("objectIDtoDate", function () {
return function (objectID) {
return new Date(parseInt((""+objectID).substr(0,8), 16)*1000);

Keybase proof

I hereby claim:

  • I am killercup on github.
  • I am hertleif (https://keybase.io/hertleif) on keybase.
  • I have a public key whose fingerprint is AB51 8068 8266 7163 3147 3388 1077 B88E B415 6921

To claim this, I am signing this object:

@killercup
killercup / Readme.md
Last active August 29, 2015 14:00
Google Play Store Purchase Stats

Go to https://play.google.com/store/account?purchaseFilter=apps, open the Inspector (CMD+ALT+I, using Chrome) and enter the following:

$('td.purchase-price').map(function(){ return +$(this).text().trim().replace('€', '').trim().replace(',', '.') }).toArray().reduce(function (memo, p) {return memo + p;}, 0)

To filter for specific in-app purchases, prepend a purchase name selector:

$('td.purchase-name:contains("Comics") ~ td.purchase-price').map(function(){ return +$(this).text().trim().replace('€', '').trim().replace(',', '.') }).toArray().reduce(function (memo, p) {return memo + p;}, 0)
@killercup
killercup / donuts.coffee
Created August 26, 2014 13:17
yeah, donuts and coffee! #d3 #charts
make_pie = ($box, data, size) ->
if size?
w = h = size
r = Math.min(w, h) / 2
r2 = r - Math.floor(r/2)
else
w = h = 40
r = Math.min(w, h) / 2
r2 = r - 12
@killercup
killercup / server.js
Last active August 29, 2015 14:07
Render React in Express App, Set HTTP Status
var path = require('path');
var express = require('express');
var l = require('lodash');
var gutil = require('gulp-util');
var React = require('react');
var App = require('./index');
var STATIC_PATH = path.join(__dirname, '../build');
@killercup
killercup / style.less
Created October 18, 2014 17:55
Flexbox Navigation
/**
* # Main Navigation Styles
*/
@import "../_style/config";
@import "../_style/mixins";
@mod: ~"NavMain";
.@{mod} {