This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
dehexify("414D415A494E47"); | |
hexify("If you can read this, you are not special. You just know ASCII."); | |
function dehexify($x) { | |
$buf=''; | |
for ($i = 0; $i < strlen($x); $i++) | |
{ | |
if ($x[$i] == ' ') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
dehexify("414D415A494E47"); | |
hexify("Banana."); | |
function dehexify($x) { | |
echo implode('', array_map('chr', array_map('hexdec', explode(',', chunk_split($x, 2, ','))))) . "\n"; | |
} | |
function hexify($x) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** Get bit length */ | |
function bl($gen) | |
{ | |
return (int) log($gen, 2) + 1; | |
} | |
/** Compute CRC */ | |
function crc($data, $test = false, $genpoly = 0b1011) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Needs php 5.6! | |
function combinations($length = 3, $chars = "abc") | |
{ | |
$p = array_fill(0, $length, 0); // counters | |
$opt_count = strlen($chars); | |
$iter_count = $opt_count ** $length; | |
for($i = 0; $i < $iter_count; $i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[[ `whoami` != "root" ]] && echo "Must be root." && exit 1 | |
echo -e "\e[1;36mCleaning package caches\e[0m" | |
# All packages | |
paccache -r -k 3 -c /var/cache/pacman | |
paccache -r -k 2 -c /var/cache/makepkg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stream = new Stream | |
a = new Listener | |
b = new Listener | |
c = new Listener | |
stream.bind(a) | |
stream.bind(b) | |
stream.bind(c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.db 0x41, CHAR_A | |
.db 0x88, CHAR_B | |
.db 0x8a, CHAR_C | |
.db 0x64, CHAR_D | |
.db 0x20, CHAR_E | |
.db 0x82, CHAR_F | |
.db 0x66, CHAR_G | |
.db 0x80, CHAR_H | |
.db 0x40, CHAR_I | |
.db 0x87, CHAR_J |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$code = [ | |
'A' => '01', | |
'B' => '1000', | |
'C' => '1010', | |
'D' => '100', | |
'E' => '0', | |
'F' => '0010', | |
'G' => '110', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "BOOM!!!" | |
rm ./* | |
touch rubble shrapnel_1 shrapnel_2 shrapnel_3 crater |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x1ff80000 - aa 00 55 ff | |
0x1ff80004 - f8 00 07 ff | |
0x1ff80008 - 00 00 ff ff | |
0x1ff8000c - 00 00 ff ff | |
0x1ff80010 - 00 00 ff ff | |
0x1ff80014 - 00 00 ff ff | |
0x1ff80018 - 00 00 ff ff | |
0x1ff8001c - 00 00 ff ff | |
0x1ff80020 - 9a 94 65 6b | |
0x1ff80024 - 89 98 76 67 |