This file contains 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
// Crop Images (cut from bottom) | |
convert -resize 1440x810^ -gravity North -extent 1440x810 orig/*.jpg -set filename:base "%[basename]" "testi-16x9-%[filename:base].jpg" |
This file contains 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
javascript:(function(){ var text = ""; var activeEl = document.activeElement; var activeElTagName = activeEl ? activeEl.tagName.toLowerCase() : null; if ( (activeElTagName == "textarea") || (activeElTagName == "input" && /^(?:text|search|password|tel|url)$/i.test(activeEl.type)) && (typeof activeEl.selectionStart == "number") ) { text = activeEl.value.slice(activeEl.selectionStart, activeEl.selectionEnd); } else if (window.getSelection) { text = window.getSelection().toString(); } var timestamp = parseInt(text) * 1000; var d = new Date(); d.setTime(timestamp); alert(d.toString()); }()); |
This file contains 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
for f in *.jpg; do convert "$f" -resize 1600 small/"$f"; done; |
This file contains 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 | |
/** | |
* Very simple password protectetion for very simple php web pages | |
*/ | |
$accessWord = 'nameOfMyGirlfriendOrDaughterWhereEsAreReplacedByThrees'; | |
if (!isset($_COOKIE['accessWord']) || $_COOKIE['accessWord'] !== md5($accessWord)) { | |
if (isset($_POST['accessWord']) && trim($_POST['accessWord']) === $accessWord) { |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style> | |
html { font-family: sans-serif; box-sizing: border-box; } | |
*, *:after, *:before { box-sizing: inherit; } | |
* { margin: 0; padding: 0; } |
This file contains 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
/** | |
* A little moment js "plugin" to allow very short relative times | |
* NOT: "26 minutes ago" | |
* BUT: "26m" | |
* | |
* Usage: | |
* var m = moment('2013-04-08 17:50:00', 'YYYY-MM-DD HH:mm:ss'); | |
* console.log(m.fromNow()); // -> "3 minutes ago" | |
* console.log(m.fromNowShort()); // -> "3m" | |
* |