Simple script to taking drag-n-drop screenshots on OSX and upload them to your own server.
- First create a new bash script with the following content:
#!/bin/bash
# Use timestamp to generate "unique" filename
filename=$(date +%s).png
package debug | |
import ( | |
"fmt" | |
"runtime" | |
"strings" | |
) | |
func Debug(data interface{}) { | |
_, file, line, ok := runtime.Caller(1) |
const ordinal = (n) => { | |
const s = ['th', 'st', 'nd', 'rd']; | |
const m = n % 100; | |
return n + (s[(m - 20) % 10] || s[m] || s[0]); | |
}; |
<?php | |
// @see http://stackoverflow.com/a/13331948/1640765 | |
function slugify($str) { | |
$str = transliterator_transliterate("Any-Latin; NFD; [:Nonspacing Mark:] Remove; NFC; [:Punctuation:] Remove; Lower();", $str); | |
$str = preg_replace('/\s+/', '-', $str); | |
return trim($str, '-'); | |
} |
Dec | Hex | Oct | Binary | Char | Description |
---|---|---|---|---|---|
0000 | 0000 | 0000 | 00000000 | NUL | Null Character |
0001 | 0001 | 0001 | 00000001 | SOH | Start of Header |
0002 | 0002 | 0002 | 00000010 | STX | Start of Text |
0003 | 0003 | 0003 | 00000011 | ETX | End of Text |
0004 | 0004 | 0004 | 00000100 | EOT | End of Transmission |
0005 | 0005 | 0005 | 00000101 | ENQ | Enquiry |
git() { | |
if [[ $1 == 'add' ]] && [[ $2 == '.' ]]; then | |
echo "No no no no ... NO!!" | |
else | |
command git "$@" | |
fi | |
} |
<?php | |
function debug($data) { | |
$bt = debug_backtrace(); | |
$bt = array_shift($bt); | |
$data = print_r($data, true); | |
$html = <<<HTML | |
<div class="debug-output"> | |
%s |
# Base editorconfig for new projects | |
root = true | |
[*] | |
end_of_line = lf | |
indent_style = space | |
tab_width = 4 | |
charset = utf-8 | |
trim_trailing_whitespace = true |