Skip to content

Instantly share code, notes, and snippets.

Daniel Lamblin dlamblin

Block or report user

Report or block dlamblin

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
dlamblin /
Last active Mar 7, 2019
Python N-Gram for characters in string
n-gram of a string by characters (not by words)
takes all args as input unless the first two args are numbers which are in
order, then it assume these are min and max length. Default min max is 2 - 60
def ngram(inp='', mn=2, mx=60):
dlamblin /
Created Dec 12, 2018
Print Powers of 2 to 2^64
#!/usr/bin/env perl
use bignum;
printf "%2s%21s\n", $_, $a;
# (perl)$ perl -Mbignum -E '$a=1;for(0..64){say" "x($_<10).$_." "x(21-length($a)).$a;$a<<=1}'
# (perl)$ perl -Mbignum -E '$a=1;for(0..64){printf"%2s%21s\n",$_,$a;$a<<=1}'
dlamblin / copy_one_line_per_sec.bash
Last active Nov 26, 2018
Subscribing to an AWS region's status RSS feeds in slack
View copy_one_line_per_sec.bash
sleep 5; while read -r line; do clear; echo $line; echo "$line" | pbcopy; sleep 1; done < "feed_commands_for_seoul_ap-northeast-2.txt"
dlamblin / swisscom_Internet-Box_os-licenses.html
Last active Jul 25, 2018
Open Source Licences page of Swisscom Internet Box 2
View swisscom_Internet-Box_os-licenses.html
Open Source License List (not included at
<div class="base-content">
<div class="text description"> <span class="translation-string">Swisscom adopts a careful approach to the open source software used in its products. Use the links below to access the websites of the open source software components used. For more information and open source contact details of the Internet-Box software suppliers go to <a href="">here</a>.</span> </div>
<div class="license-container">
<div class="license-name"> <a href="/static/licenses/AP/stargatev2/avahi-LICENSE.txt" target="_blank">avahi</a> </div>
<div class="license-site"> <a href="" target="_blank"></a> </div>
<div class="license-container">
<div class="license-name"> <a href="/static/licenses/AP/stargatev2/dbus-COPYING.t
dlamblin /
Created Oct 26, 2017
Extract a deb's files on Mac OS with tar
tar -xOf $1 data.tar.xz |tar -tv
You can’t perform that action at this time.