Skip to content

Instantly share code, notes, and snippets.

@remorses
remorses / multiway_trees_bfs.hs
Created May 28, 2019 19:19
breadth first search (bfs) for multiway trees implemented in haskell
data Tree a = Node a [Tree a]
traverseBF :: Tree a -> Tree a
traverseBF tree = tbf tree
where
tbf (Node x []) = Node x []
tbf (Node x xs) = Node x (map tbf $ xs)
set -ex
cd `dirname ${BASH_SOURCE[0]}`
test -f ./VERSION || (echo "file VERSION containing current version is needed" && exit 1)
git pull
rm -rf *.egg-info
rm -rf dist
rm -rf build
@remorses
remorses / deploy_image.sh
Last active February 12, 2019 14:34
Docker deploy with version tag
set -ex
##################################################
REGISTRY="myregistry.com:5000" # for docker hub just put your username
IMAGE=`basename $PWD` # image name
##################################################
@remorses
remorses / client.html
Created September 17, 2017 17:57 — forked from diorahman/client.html
Ajax, call jQuery POST to node.js expressjs
<html>
<head>
<title>jsonp test</title>
<script src="http://code.jquery.com/jquery-1.6.2.min.js"></script>
<script type="text/javascript">
$(function(){
$('#select_link').click(function(e){
e.preventDefault();
console.log('select_link clicked');