Skip to content

Instantly share code, notes, and snippets.

View MaxwellBo's full-sized avatar
🎈
please do not swear on my profile thanks

Max Bo MaxwellBo

🎈
please do not swear on my profile thanks
View GitHub Profile
@MaxwellBo
MaxwellBo / .git-commit-template.txt
Last active July 25, 2016 05:03 — forked from adeekshith/.git-commit-template.txt
A Git commit template to make it easy to enforce a good and uniform commit message style across teams.
# |<--- ^ <emoji>? <type>: <subject> ^ --->|
# |<--- v Explain why this change is being made v --->|
# |<--- v Provide links to tickets, issues or other resources v --->|
# --- COMMIT END ---
import itertools
def main():
# These should be modified by you
parps = ["1", "2", "3"] # PARticiPantS
countries = set(["a", "b", "c"])
prefs_list = [ ["a", "b", "c"]

Libraries

Dropwizard uses

  • Jetty for HTTP
  • Jersey for REST
  • Jackson for JSON
  • Metrics for metrics
  • Guava for utilities
  • SL4J & Logback for logging
  • JDBI for datastorage
\RequirePackage[l2tabu, orthodox]{nag} % linter
\documentclass[11pt,a4paper]{report}
\usepackage[utf8]{inputenc}
\usepackage{fullpage}
% \usepackage[margin=1in]{geometry} bad practise, but useful
\usepackage[colorlinks = true,
linkcolor = blue,
urlcolor = blue,
import Control.Monad
import Control.Applicative
-- Application operators LHS | RHS | RESULT
($) :: (a -> b) -> a -> b
(<$>) :: Functor f => (a -> b) -> f a -> f b
(<*>) :: Applicative f => f (a -> b) -> f a -> f b
(=<<) :: Monad m => (a -> m b) -> m a -> m b
(5+) $ 5 == 10
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TemplateHaskell #-}
module Main where
import System.Environment
import Data.Maybe
import Data.List
import Data.Char
import Control.Monad.RWS
@MaxwellBo
MaxwellBo / PlayRss.scala
Created July 6, 2017 23:24 — forked from crudh/PlayRss.scala
Scala/Play RSS example
def rss = Action { implicit request =>
Ok(
<rss version="2.0">
<channel>
<title>News Application</title>
<link>{ routes.Application.index.absoluteURL(false) }</link>
<description>News Application</description>
{ NewsArticle.all.map { newsArticle =>
<item>
<title>{ newsArticle.title }</title>

Keybase proof

I hereby claim:

  • I am MaxwellBo on github.
  • I am mjbo (https://keybase.io/mjbo) on keybase.
  • I have a public key whose fingerprint is D23A D67F BF45 2FAB 26E1 40F2 B3A3 DA2C 55C4 ABB2

To claim this, I am signing this object:

import json
class JSONToMarkdownParser(object):
def parse(self, filename_in, filename_out):
with open(filename_in, 'r') as f_in, open(filename_out, 'w') as f_out:
python_type = json.loads(f_in.read())
lines = python_type['root']['children']
for line in lines:
tag = line.get('type')
sudo ln -s /Library/gurobi752/mac64/lib/libgurobi75.so ~/lib/libgurobi75.so\
sudo ln -s /Library/gurobi752/mac64/lib/libgurobi_g++4.2.a ~/lib/libgurobi_g++4.2.a\
sudo ln -s /Library/gurobi752/mac64/lib/libGurobiJni75.jnilib ~/lib/libGurobiJni75.jnilib\
sudo ln -s /Library/gurobi752/mac64/lib/libaes75.so ~/lib/libaes75.so\
sudo ln -s /Library/gurobi752/mac64/lib/libgurobi_c++.a ~/lib/libgurobi_c++.a\
sudo ln -s /Library/gurobi752/mac64/lib/libgurobi_stdc++.a ~/lib/libgurobi_stdc++.a