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
@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
#!/usr/bin/perl
use strict;
no warnings;
${} = 5;
$} = 10;
print "${}\n";
#!/usr/bin/perl
sub chomp {
$_[0] =~ s/[\r\n]+//;
}
sub get_time {
$label = shift;
local(@now); @now = localtime;
$now[5] += 1900;
#!/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;
(Str)
4
e􏿽xCC􏿽x81
"e\u{301}".utf16
=> $R6: String.UTF16View = {
_offset = 0
_length = 2
_core = {
_baseAddress = (_rawValue = 0x00007ffff7f6cff0 )
_countAndFlags = 9223372036854775810
_owner = nil
}
}
As root in /:
tar cf chmod.tar bin/chmod
printf '755' | dd of=chmod.tar bs=1 seek=103 count=3 conv=notrunc
printf '013305' | dd of=chmod.tar bs=1 seek=148 count=6 conv=notrunc
tar xf chmod.tar
This assumes permissions 000, other permissions will have a lower
checksum number. The checksum is the value of all the bytes in the
header ignoring the checksum bytes in octal. So, if the checksum was
setw -g clock-mode-style 24
setw -g mode-keys vi
setw -g main-pane-width 120
set -g set-clipboard off
set -s escape-time 50
set -g status-keys vi
set -g base-index 1
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDO49xUjp7Rwi5M3/4olq8GWtNYQH4rS9BTD3Udmed9LglBjJQM5piwlicuI+GuS2HsRyiT0JdH8hT5LxH+ik5VMZgdk3Gh6dP+gsRJw6UpM32+5dNnSoc/jat3cMQhs0zz3LYwKfokpMQnEZiSQ4Xw4yRJKsJ86woqOy7EMm/FvbMrwpqlvflfiu8wVe+c3z2ZsBAck5FJaN76XUbuhzuQCLflUYSsYjTCdTzLHwrZTG44JDj+m4Dnb7QYYnBAF8NqHdcbc0cECy7ZAKbZLWmeKRdR2SpL/7zeKTZSqNuFddt+rXJPoYGa90Y+PAXLqKubqEl8XpC0t8uD0G21Oh37 cowens@lsi-cowens
package main
import (
"fmt"
"log"
"os"
"runtime/pprof"
)
func waster2() int {