I hereby claim:
- I am dreyer on github.
- I am dreyer (https://keybase.io/dreyer) on keybase.
- I have a public key whose fingerprint is 1FC2 90F9 9E14 B6D8 35D4 BC81 4758 2E67 AAD0 DFCD
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
-- USE AdventureWorks; | |
SELECT | |
s.name AS 'sys_schema', | |
t.name AS 'sys_table', | |
i.name AS 'sys_index', | |
x.alloc_unit_type_desc, | |
x.avg_fragmentation_in_percent, | |
x.page_count | |
FROM sys.dm_db_index_physical_stats (DB_ID(), NULL, NULL, NULL, NULL) x | |
INNER JOIN sys.tables t ON t.object_id = x.object_id |
// Paste the snippet in Chrome console and hit enter. | |
// Source: https://chrome.google.com/webstore/detail/dont-fuck-with-paste/nkgllhigpcljnhoakjkgaieabnkmgdkb | |
document.addEventListener('paste', (e) => { e.stopImmediatePropagation(); return true; }, true); |
$ cd /usr/local/lib | |
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.5.dylib | |
$ sudo ln -s ../../lib/libSystem.B.dylib libgcc_s.10.4.dylib |
#!/bin/bash | |
# | |
# Iterate through every .MKV file in the current directory and use the | |
# filename base as the title while assigning the second subtitle track | |
# as the default and the second audio track as the default. | |
# | |
# Requires mkvpropedit from MKVToolNix: | |
# https://github.com/mbunkus/mkvtoolnix | |
# | |
for file in *.mkv; do base=${file%.*}; mkvpropedit "${file}" --edit info --set "title=${base}" --edit track:s1 --set flag-default=0 --edit track:s2 --set flag-default=1 --edit track:a1 --set flag-default=0 --edit track:a2 --set flag-default=1; done |
#!/bin/bash | |
URL='https://web-api.nordvpn.com/v1/ips/info' | |
JSON=$(curl -s $URL) | |
printf "\n" | |
#echo $JSON | python -m json.tool | |
echo $JSON | python -c 'import sys, json; data = json.load(sys.stdin); print("IP: %s (%s)\nStatus: %s" % (data["ip"], data["isp"], "\033[32mProtected" if data["protected"] is True else "\033[31mUnprotected"));' | |
printf "\n" |
<?php | |
function crc16( $str, $params = array() ) | |
{ | |
$defaults = array( | |
'initial_value' => 0xFFFF, | |
'polynomial' => 0x1021, // CRC-CCITT | |
'xor_out' => 0, | |
); | |
foreach ( $defaults as $k => $v ) |
<?php | |
/* | |
DONT FORGET TO DELETE THIS SCRIPT WHEN FINISHED! | |
*/ | |
ini_set( 'display_errors', 1 ); | |
error_reporting( E_ALL ); | |
$from = '[email protected]'; |
// @source: http://stackoverflow.com/questions/1349404/generate-a-string-of-5-random-characters-in-javascript | |
function randomStr(m) { | |
var m = m || 9; s = '', r = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | |
for (var i=0; i < m; i++) { s += r.charAt(Math.floor(Math.random()*r.length)); } | |
return s; | |
}; |