Skip to content

Instantly share code, notes, and snippets.


Andrea Franceschini Morpheu5

View GitHub Profile
Morpheu5 / process_trello.rb
Last active Aug 29, 2015
A thing that grabs a Trello board export in JSON and turns it into a rather badly formatted Markdown document.
View process_trello.rb
#!/usr/bin/env ruby
require 'json_select'
require 'yajl'
require 'optparse'
options = {} do |opts|
opts.banner = "Usage: #{$0} [options]"
opts.separator ''
View FBOTest.cpp
#include "cinder/app/AppNative.h"
#include "cinder/gl/gl.h"
#include "cinder/gl/Fbo.h"
#include "cinder/Perlin.h"
using namespace ci;
using namespace ci::app;
using namespace std;
#define IS_LANDSCAPE (getWindowWidth()/1.6f > getWindowHeight())
Morpheu5 / bft-test.cpp
Created Nov 25, 2015
A breadth-first tree traversal. #notetoself
View bft-test.cpp
#include <iostream>
#include <list>
using namespace std;
struct Node {
int value;
list<Node *> children;
Morpheu5 / Logger.h
Last active Dec 22, 2015
A ridiculously lightweight logging singleton class suitable for multi-threading applications. Just include it, initialize it, set the thread up, and you are good to go.
View Logger.h
Copyright (c) 2013, Andrea Franceschini <>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
View test.rb
require 'bundler/inline'
rescue LoadError => e
$stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler'
raise e
gemfile(true) do
source ''
gem 'rails', '>= 5.0.0'
Morpheu5 / .zshrc
Last active Nov 6, 2016
View .zshrc
### 2016-11-06 (porto)
export R_HOME='/opt/local/Library/Frameworks/R.framework/Resources'
path+=(/opt/local/bin /opt/local/lib/mariadb-10.0/bin ~/.rvm/bin ~/anaconda/bin ~/.bin ~/.cabal/bin)
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
source ~/.antigen/antigen.zsh
View CalculatorScreen.kt
package net.morpheu5.bleedingscorecalculator
import android.content.SharedPreferences
import android.os.Bundle
View actions.json
View LogRow.swift
struct Element: Decodable {
struct BinaryOperationProperties: Decodable
{ let operation: String }
struct BracketsProperties: Decodable
{ let type: String }
struct ChemicalElementProperties: Decodable
{ let element: String }
struct DifferentialProperties: Decodable
{ let letter: String }
struct FunctionProperties: Decodable
const greekLetterMap = { "alpha": "α", "beta": "β", "gamma": "γ", "delta": "δ", "epsilon": "ε", "varepsilon": "ε", "zeta": "ζ", "eta": "η", "theta": "θ", "iota": "ι", "kappa": "κ", "lambda": "λ", "mu": "μ", "nu": "ν", "xi": "ξ", "omicron": "ο", "pi": "π", "rho": "ρ", "sigma": "σ", "tau": "τ", "upsilon": "υ", "phi": "ϕ", "chi": "χ", "psi": "ψ", "omega": "ω", "Gamma": "Γ", "Delta": "Δ", "Theta": "Θ", "Lambda": "Λ", "Xi": "Ξ", "Pi": "Π", "Sigma": "Σ", "Upsilon": "Υ", "Phi": "Φ", "Psi": "Ψ", "Omega": "Ω" }
const moo = require("moo");
const lexer = moo.compile({
Fn: ['cos', 'sin', 'tan',
'cosec', 'sec', 'cot',
'arccos', 'arcsin', 'arctan',
'arccosec', 'arcsec', 'arccot',
'cosh', 'sinh', 'tanh', 'cosech', 'sech', 'coth',