Skip to content

Instantly share code, notes, and snippets.

@dlamblin
dlamblin / powers_of_2_in_decimal.pl
Created December 12, 2018 13:40
Print Powers of 2 to 2^64
#!/usr/bin/env perl
use bignum;
$a=1;
for(0..64){
printf "%2s%21s\n", $_, $a;
$a<<=1;
}
# (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
dlamblin / copy_one_line_per_sec.bash
Last active April 24, 2024 14:19
Subscribing to an AWS region's status RSS feeds in slack
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
dlamblin / swisscom_Internet-Box_os-licenses.html
Last active July 25, 2018 17:27
Open Source Licences page of Swisscom Internet Box 2
Open Source License List (not included at https://www.swisscom.ch/en/residential/help/device/open-source.html)
<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="http://www.swisscom.ch/opensource">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="https://github.com/lathiat/avahi/releases/tag/v0.6.32" target="_blank">https://github.com/lathiat/avahi/releases/tag/v0.6.32</a> </div>
</div>
<div class="license-container">
<div class="license-name"> <a href="/static/licenses/AP/stargatev2/dbus-COPYING.t
@dlamblin
dlamblin / extract_deb_filelist.sh
Created October 26, 2017 07:10
Extract a deb's files on Mac OS with tar
tar -xOf $1 data.tar.xz |tar -tv