Skip to content

Instantly share code, notes, and snippets.

@ablakely
ablakely / README.md
Last active September 3, 2022 03:01
thinklight

thinklight

Controls the ThinkLight on IBM/Lenovo ThinkPads

Usage

On

thinklight on

@echo off
if not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
@rem *** Disable Some Service ***
sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
@0racle
0racle / Matplotlib.pm6
Created April 11, 2017 14:28
Matplotlib in Perl6
use Inline::Python;
my $py = Inline::Python.new();
$py.run('import matplotlib.pyplot');
class Matplotlib::Mlab {
method FALLBACK($name, |c) {
$py.call('matplotlib.mlab', $name, |c)
}
}
@pascalchevrel
pascalchevrel / byzanz-record-window.sh
Created January 17, 2017 12:55
A bash script to screencast a window into a Gif with good quality
#! /usr/bin/env bash
# This script uses byzanz-record to generate an animated Gif for your interactions
# with a window
# usage:
# Record a window for 3 seconds and save to /home/foo/yo.gif
# byzanz-record-window 3 /home/foo/yo.gif
#
# without parameters, it defaults to 10s and a target file in /tmp/screencast.gif
#
@garu
garu / Perl Encryption Primer.md
Last active September 13, 2022 01:54
Perl Encryption Primer, by Timm Murray

Perl Encryption Primer

by Timm Murray

This is a compilation of the "Perl Encryption Primer" series of articles by Timm Murray, as published on http://www.wumpus-cave.net/category/encryption/. I have taken the liberty of moving the content here (as is), formatting it as Markdown and ordering them chronologically from top to bottom to easen the reading experience. Enjoy!

Timm also made a one-hour video of the presentation he gave at MadMongers, which summarizes the content below.

@masak
masak / pack-unpack.md
Created September 24, 2011 10:58
A first approach to pack/unpack in Perl 6

Here is the difference between Perl 5 and Perl 6 pack/unpack:

Perl 5                      Perl 6

pack(List)  --> Str         pack(List)  --> Buf
unpack(Str) --> List        unpack(Buf) --> List

Not only that, but some Perl 5 template rules assume an uncomplicated two-way street between Buf and Str. There simply is no real distinction in Perl 5 between Buf and Str, and Perl 5 makes use of that quite a bit.

Just looking at the description of the first template rule gives an indication of this: