Skip to content

Instantly share code, notes, and snippets.

Dmitry Klionsky ten0s

Block or report user

Report or block ten0s

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
ten0s / graph_fsm.erl
Created Jul 8, 2019 — forked from erszcz/graph_fsm.erl
Vance Shipley's graph_fsm - a tool for drawing Erlang gen_fsm diagrams (
View graph_fsm.erl
%% graph_fsm.erl
%% Author: Vance Shipley, Motivity Telecom Inc. <>
%% Date: November, 2000
%% This library is free software; you can redistribute it and/or
%% modify it under the terms of the GNU Lesser General Public
%% License as published by the Free Software Foundation; either
%% version 2 of the License, or (at your option) any later
ten0s / gist:f6b4f598a46344ab0dfd
Created Jun 1, 2015
Fix Vagrant's Authentication failure after re-building the box
View gist:f6b4f598a46344ab0dfd
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address:
default: SSH username: vagrant
default: SSH auth method: private key
default: Warning: Connection timeout. Retrying...
default: Warning: Remote connection disconnect. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...
default: Warning: Authentication failure. Retrying...



df -h
ten0s / gist:3d5bb10be78a9cf47b869fc3ff1713b1
Created Oct 25, 2017
Open automatically multiple xfce terminal tabs
View gist:3d5bb10be78a9cf47b869fc3ff1713b1
for h in; do
opts[k++]="--command=bash -c 'ssh $h 'hostname'; exec bash'"
unset "opts[0]" # don't create an empty tab
xfce4-terminal "${opts[@]}"
ten0s / c.erl
Last active Dec 27, 2016
erlang shell ls
View c.erl
ls(Dir) ->
case file:list_dir(Dir) of
{ok, Entries} ->
{error, enotdir} ->
{error, Error} ->
format("~ts\n", [file:format_error(Error)])
View gist:0a007f6cfbd122fd56ea3fd3443cac84
Erlang Node Memory Statistics
[newrelic:record_metric(list_to_binary(lists:concat(["Erlang/Memory/", K])), V) || {K, V} <- erlang:memory()].
Erlang Node Process Count
newrelic:record_metric(<<"Erlang/SystemInfo/ProcessCount">>, erlang:system_info(process_count)).
View gist:8f67551fe7c3ac32501c20f7b7a39c6f
dropbox stop
# Pretent Dropbox is running
# See 'is_dropbox_running' function
# Simulate 'dropbox' string in /proc/%d/cmdline
bash -c 'read dropbox' &
ten0s / gen-deploykey
Last active Aug 18, 2016
Multiple Github Deploy keys on single machine
View gen-deploykey
set -e
script_name=$(basename ${self})
script_dir=$(dirname ${self})
ten0s / gist:40ecec1aace02cbc4051
Created Sep 11, 2015
How to debug jinja2 templates
View gist:40ecec1aace02cbc4051
In [1]: from jinja2 import Template
In [2]: Template("{{s.split('-')}}").render(s='a-bad-string')
Out[2]: u"['a', 'bad', 'string']"
ten0s / ipython_gvmagic.ipynb
Last active Jul 23, 2016
Display graphviz dot in Jupyter using IPython2 with gvmagic
View ipython_gvmagic.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.