Skip to content

Instantly share code, notes, and snippets.

View cowens's full-sized avatar

Chas. J. Owens IV cowens

  • Martinsburg, WV
View GitHub Profile
"e\u{301}".utf16
=> $R6: String.UTF16View = {
_offset = 0
_length = 2
_core = {
_baseAddress = (_rawValue = 0x00007ffff7f6cff0 )
_countAndFlags = 9223372036854775810
_owner = nil
}
}
(Str)
4
e􏿽xCC􏿽x81
#!/usr/bin/perl
dbmopen(%db, "calllog", 0777);
print "START-OF-LOG: 3.0\n";
@keys = keys %db;
for $k (sort @keys) {
$rec = $db{$k};
($freq, $mode, $date, $time, $exch1, $call, $exch2) = split(",", $rec);
write;
#!/usr/bin/perl
sub chomp {
$_[0] =~ s/[\r\n]+//;
}
sub get_time {
$label = shift;
local(@now); @now = localtime;
$now[5] += 1900;
#!/usr/bin/perl
use strict;
no warnings;
${} = 5;
$} = 10;
print "${}\n";
@cowens
cowens / 0_reuse_code.js
Last active August 29, 2015 14:24
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@cowens
cowens / gist:e4f5c67c57b1590a38aa
Created April 15, 2015 17:15
Example of running out of room with print
mkdir ram
sudo mount -t tmpfs -osize=4k tmpfs ram
perl -le 'open $f, ">", "ram/f"; $i = 0; while (print $f "x") { $i++ }; print "ran out of room after $i bytes"'
### Keybase proof
I hereby claim:
* I am cowens on github.
* I am cowens (https://keybase.io/cowens) on keybase.
* I have a public key whose fingerprint is 55A3 0C7F 506A F8C1 667B 94B9 E39B D92B 39CB 08BA
To claim this, I am signing this object:
use strict;
use warnings;
use Benchmark;
my $s = "aaaa 192.168.0.1 sdf";
my %subs = (
norm => sub {
return scalar $s =~ /(a)(a)(a)(a)/;
#!/usr/bin/perl
use strict;
use warnings;
@ARGV = map {
/((?:[^@]+@)?[^:]+):(.*)/ ? "ssh $1 cat $2 |" : $_
} @ARGV;
while (<>) {