Skip to content

Instantly share code, notes, and snippets.

View health.erl
check/0, alert/0, dump/0,
threshold/1, poll/1, url/1
-export([init/1, handle_call/3]).
View Directives Inheritance
Reusing an AngularJS Directive core code. The idea is to:
** 1. conceal the actual directive behaviour in a separate JS "class",
** 2. store that in an Angular service,
** 3. inject that service into an Angular directive,
** 4. just have the directive factory function return the constructed instance of the "class".
That is to separate the directive core code from the actual directive factory.
Then one actually wants to inherit a directive core "class" from another. It's not really a matter of JS inheritance, but more on how to inject one into the other by means of Angular modules, without actually instantiating none of them until needed,
View directives.js
// Define core directive code + attributes and store that as a module value
angular.module('com.namespace.directives').value('MyDirectiveCore', MyDirectiveCore);
function MyDirectiveCore($compile) {
this.restrict = 'A';
this.priority = 10; = postLink;
return this;
View console.xml
<?xml version="1.0"?>
<console change_refresh="10" refresh="100" rows="20" columns="98" buffer_rows="500" buffer_columns="0" init_dir="c:\" start_hidden="0" save_size="1" shell="c:\bip\git\bin\sh.exe --login -i">
<color id="0" r="0" g="43" b="54"/>
<color id="1" r="38" g="139" b="210"/>
<color id="2" r="133" g="153" b="0"/>
<color id="3" r="42" g="161" b="152"/>
<color id="4" r="220" g="50" b="47"/>
<color id="5" r="211" g="54" b="130"/>
View file.html
<!DOCTYPE html>
<meta charset=utf-8 />
<link rel="stylesheet" href="styles.css">
Hello World
View gist:5125292
<!-- BiwaScheme 0.6.1 -->
<title>enchant.js sample in BiwaScheme</title>
<div id="enchant-stage" />
miebach / git-vlog
Created Jul 29, 2012 — forked from asabaylus/git-vlog
Git visual log for the console
View git-vlog
A nice visual log for Git command line
I like having a quick visual log for Gits command line. Here’s a little git alias which’ll display a brief and colorful summary for your projects.
Enter the following code in terminal or git bash.
You can now generate a visual tree style log, open your shell
miebach /
Created Apr 8, 2012 — forked from lanius/
Install riak 1.1.2 and R14B03 on a minimal Ubuntu 10.04 LTS server
# Install riak-0.14.2rc8 to Ubuntu 10.04 LTS 32 bit
# make sure you have a compatible build system and the ncurses and openssl
# development libraries installed, also git and curl:
sudo aptitude install build-essential libncurses5-dev openssl libssl-dev git-core curl -y
# download, build and install Erlang:
#! /bin/sh
# Script to provide answer for question:
echo create origin
mkdir origin
cd origin/
git init --bare
cd ..
View gist:435950
# colors for ls, etc.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\]\u@\h \[\033[01;34m\]\w\[\033[01;35m\]$(parse_git_branch)\[\033[01;34m\] \$ \[\033[00m\]'
PS1='\[\033[01;37m\]\w\[\033[00;35m\]$(parse_git_branch)\[\033[00m\] \$ '