Skip to content

Instantly share code, notes, and snippets.

@namjae
namjae / rebar.config
Created November 21, 2013 06:44 — forked from dch/rebar.config
{port_env, [
%% add MS Visual C++ support to rebar on Windows
{"win32", "CC", "cl.exe"},
{"win32", "CXX", "cl.exe"},
{"win32", "LINKER", "link.exe"},
{"win32", "DRV_CXX_TEMPLATE",
"$CXX /c $CXXFLAGS $DRV_CFLAGS $PORT_IN_FILES /Fo$PORT_OUT_FILE"},
{"win32", "DRV_CC_TEMPLATE",
"$CC /c $CFLAGS $DRV_CFLAGS $PORT_IN_FILES /Fo$PORT_OUT_FILE"},
# Copyright 2012 Erlware, LLC. All Rights Reserved.
#
# This file is provided to you under the Apache License,
# Version 2.0 (the "License"); you may not use this file
# except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
@namjae
namjae / my_erl_prj_init_with_rebar
Last active August 29, 2015 14:06
rebar 쓰기
#!/bin/bash
# init a prj w/ rebar, git flow
cd /usr/local/bin
wget https://github.com/rebar/rebar/wiki/rebar
chmod u+x rebar
rebar -c # lists all commands
mkdir /path/to/prj
cd $_
rebar create-app appid=myapp # creates project named 'myapp'
cd myapp
@namjae
namjae / notifywindow.cpp
Last active January 23, 2016 18:28
Simple Notification Widget on Qt
/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
/**
* @file notifywindow.cpp
* @author M.W.Park <manywaypark@gmail.com>
* @date Thu Nov 20 11:31:12 2014
*
* @brief
*
* @note tested on windows 8.1, Qt 5.3 for now.
*/
@namjae
namjae / R6RS.md
Last active August 29, 2015 14:10 — forked from dharmatech/R6RS.md

The implementations

  • Ikarus - Fast. GPL3.

  • Ypsilon - Used for professional game development.

  • Chez - Best Scheme compiler in the world. Commercial.

  • Larceny - Used for academic research in garbage collection.

@namjae
namjae / start-erlang
Last active August 29, 2015 14:11
make erlang node.
# kerl
sudo -i
apt-get build-dep erlang
cd /usr/local/bin
curl -O https://raw.githubusercontent.com/spawngrid/kerl/master/kerl
chmod a+x kerl
kerl list releases
kerl build R16B03 r16b03
kerl list builds
kerl install r16b03 ~/erlang/r16b03
@namjae
namjae / setup-vboxtool.sh
Last active August 29, 2015 14:12
VBoxTool setup
#!/bin/bash/bash
# simple setup of vboxtool(http://vboxtool.svn.sourceforge.net/)
# requires root
# VIRTUAL MACHINE NAME HERE & VIRTUALBOX_USER_ID_HERE should be replaced
svn checkout svn://svn.code.sf.net/p/vboxtool/code/trunk vboxtool-code
pushd .
cd vboxtool-code/
#cat readme.txt # following instructions are all from this file
cp script/vboxtool /usr/local/bin/
@namjae
namjae / erl
Last active August 29, 2015 14:23 — forked from sideshowcoder/erl
#!/bin/sh
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 1996-2012. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
@namjae
namjae / byobuCommands
Created March 19, 2016 11:15 — forked from jshaw/byobuCommands
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@namjae
namjae / GroupBy.hs
Created May 24, 2016 01:53 — forked from jbpotonnier/GroupBy.hs
groupBy in Erlang and Haskell
module GroupBy where
import Data.Map (Map)
import qualified Data.Map as Map
groupBy :: Ord b => (a -> b) -> [a] -> Map b [a]
groupBy f = foldr (\ v -> Map.insertWith (++) (f v) [v]) Map.empty
groupBy' :: Ord b => (a -> b) -> [a] -> Map b [a]