I hereby claim:
- I am lcherone on github.
- I am lcherone (https://keybase.io/lcherone) on keybase.
- I have a public key whose fingerprint is 3741 7D7C 39BA F498 393C 700D 968E 8ABC 3112 189E
To claim this, I am signing this object:
<?php | |
echo passgen(20); //K4YFnMW5muf0kZTMl6h3 | |
function passgen($length = 20) | |
{ | |
// define base string - add multiplex to pad to an infinate length | |
$alpha = str_repeat( | |
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", | |
intval($length + 1) | |
); |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
# | |
set -e | |
export DEBIAN_FRONTEND=noninteractive | |
source /etc/environment && export PATH && export HOME='/root' | |
# Set working vars, change these to suit | |
# | |
# Application Name |
#!/bin/bash | |
# | |
# Apply autostart to all containers and default profile. | |
# - Especially handy if containers have their own autostart value. | |
# - Could be used for any config value with a tweek. | |
# | |
# ask | |
while true; do |
#!/bin/bash | |
# | |
# Stop all running containers | |
# | |
# stop running containers | |
for container in $(lxc list volatile.last_state.power=RUNNING -c n --format csv); do | |
lxc stop "$container" | |
done |
/** | |
* Date.UTC mysql date converter | |
* | |
* @author Lawrence Cherone <lawrence@cherone.co.uk> | |
*/ | |
var UTC = (function() { | |
var _Date = function(year, month, day, hour, minute, second) { | |
// year is string string date | |
if (typeof year === "string" && year != '' && month == undefined && day == undefined) { | |
var regex_date = /^([0-9]{2,4})-([0-1][0-9])-([0-3][0-9])?$/; |
Android | |
*#06# - IMEI | |
*#0*# - Sensor Tests | |
*#9900# - SysDump | |
*#0808# - USBSettings | |
*#0011# - ServiceMode | |
*#0228# - BatteryStatus | |
*#1234# - Version | |
*#2663# - Firmware version |
<?php | |
$xor = function ($str, $key = 192) { | |
for ($i = 0; $i < strlen($str); $i++) { | |
$str[$i] = chr(ord($str[$i]) ^ $key); | |
} | |
return $str; | |
}; | |
$enc = $xor("xorme"); | |
$dec = $xor($enc); |
<?php | |
declare(strict_types=1); | |
/** | |
* Fibonacci sequence generator, a play with PHP7 features. | |
* @author Lawrence Cherone <cherone.co.uk> | |
*/ | |
class Fibonacci { | |
private $sequence = []; |
<?php | |
// define an example, our people, messages and their keys | |
$people = [ | |
'alice' => [ | |
'keys' => gen_keys(), | |
'msg' => 'Hi Bob, I\'m sending you a private message' | |
], | |
'bob' => [ | |
'keys' => gen_keys(), |