port in use by program:
netstat -lp
kill apps by port:
fuser -k smtp/tcp
$sub = str_split(substr($input_string, 0, 400)); | |
$chars = ''; | |
$ords = ''; | |
foreach ($sub as $character) | |
{ | |
if ($character == "\n" || $character == "\r") | |
continue; | |
$chars .= $character . ' '; | |
$ords .= ord($character) . "\t"; |
$(document).ready(function(){ | |
$.validator.addMethod('hex_format', function(value, element){ | |
var hexregex = /^[0-9ABCDEF]{6}$/i; | |
return hexregex.test(value); | |
}); | |
$.validator.addMethod('http_url_format', function(value, element){ | |
if (value.length == 0) | |
{ |
//=== var_dump anything in clipboard ===\\ | |
komodo.assertMacroVersion(3); | |
if (komodo.view) { komodo.view.setFocus(); } | |
komodo.view.selection = 'echo \'<pre>\';' | |
ko.commands.doCommand('cmd_newline') | |
komodo.view.selection = 'echo __FILE__ . \' @ \' . __LINE__ . "\\n";'; | |
ko.commands.doCommand('cmd_newline') | |
komodo.view.selection = 'var_dump('; | |
ko.commands.doCommand('cmd_paste') |
Author: http://www.razvantudorica.com/08/web-server-in-one-line-of-bash/ | |
while true; do { echo -e 'HTTP/1.1 200 OK\r\n'; cat index.html; } | nc -l 8080; done | |
index.html can be any file you want to serve it. | |
You can access it after that as: http://host_ip:8080/ |
sudo python -m smtpd -n -c DebuggingServer localhost:25 |
svn status -q | xargs | svn diff | grep ^+ | grep msg. | sed -r -e 's|(.+)\$msg\.([^}]+)(.+)|\2|' | sort | uniq |
gsettings set org.gnome.desktop.interface gtk-key-theme "Emacs" |
port in use by program:
netstat -lp
kill apps by port:
fuser -k smtp/tcp
/**
* Mock iterator
*
* This attaches all the required expectations in the right order so that
* our iterator will act like an iterator!
*
* @param Iterator $iterator The iterator object; this is what we attach
* all the expectations to
* @param array An array of items that we will mock up, we will use the
bin/console doctrine:schema:update --dump-sql -e test | awk '!/CONSTRAINT/' | mysql -u user -p dbname