Skip to content

Instantly share code, notes, and snippets.


Dmitrii 'Mamut' Dimandt dmitriid

View GitHub Profile
Frikki / dialogue.js
Last active Oct 3, 2017
Simple Cycle.js (Nested) Dialogue with MVI Example
View dialogue.js
/** @jsx hJSX */
import {hJSX} from '@cycle/dom';
const DIALOGUE_NAME = `dialogue`;
let idSuffix = 0;
function makeCycleId() {
return `${DIALOGUE_NAME}-${idSuffix++}`;
axefrog / example.js
Last active Sep 8, 2015
Simple logger for my Cycle.js apps. Writes pretty console output and exposes an observable message stream if further processing is desired.
View example.js
import logger from './logger';
let log = logger('Category');
log.trace('Just tracing stuff');
log.debug('Here is a debug message');
log.success('The successful thing happened that we wanted to happen');'Information makes the world go around, and here is that string:', str);
log('An info message can be logged using short form');
log.warn('You better be careful about this kind of thing');
willurd /
Last active Aug 17, 2022
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
maxlapshin /
Last active Dec 17, 2015
Build and clean small server erlang distribution without useless libraries
[ -f /usr/bin/gcc ] || (apt-get update && apt-get install -y build-essential libncurses-dev libssl-dev chrpath)
#tar zxf libatomic_ops-7.2d.tar.gz
#cd libatomic_ops-7.2/
#./configure --prefix=/opt/flussonic
#make install
#cd ..
renatoalbano / encode_uri_rfc3986.erl
Created Sep 27, 2012
erlang percent encoding that works with utf-8
View encode_uri_rfc3986.erl
-author('Renato Albano <>').
%% Taken from <>,
%% from <>
%% and <>
encode([C | Cs]) when C >= $a, C =< $z ->
andreineculau /
Last active Oct 9, 2015
JIRA ticket to branch name
#!/bin/bash -e
# Usage # copy from browser "JIRA-205\nTicket title"
# $ jira2branch # echoes jira-205-ticket-title
# $ JIRA2BRANCH_TEAM=team jira2branch # echoes jira-205-team-ticket-title
# $ jira2branch team2 # override mode
# echoes jira-205-team2-ticket-title ignoring $JIRA2BRANCH_TEAM
evansolomon /
Created Apr 1, 2012
Git auto-complete script
# bash completion support for core Git.
# Copyright (C) 2006,2007 Shawn O. Pearce <>
# Conceptually based on gitcompletion (
# Distributed under the GNU General Public License, version 2.0.
# The contained completion routines provide support for completing: