(array_add|array_collapse|array_divide|array_dot|array_except|array_first|array_flatten|array_forget|array_get|array_has|array_last|array_only|array_pluck|array_prepend|array_pull|array_random|array_set|array_sort_recursive|array_sort|array_where|array_wrap|camel_case|ends_with|kebab_case|snake_case|starts_with|str_after|str_before|str_contains|str_finish|str_is|str_limit|str_plural|str_random|str_replace_array|str_replace_first|str_replace_last|str_singular|str_slug|str_start|studly_case|title_case)
/* | |
Need to delete most, but not all, of the records in a | |
large table? Deleting the normal way can be VERY slow, | |
but this will keep the most recent million (or however | |
many) rows of your large table | |
*/ | |
/* --- CONFIGURE ------------------------------------------- */ | |
SET @tbl := 'TABLE_NAME_HERE'; -- table name | |
SET @keep := 1000000; -- how many of the newest rows to keep |
<?php | |
// How long can a function name in PHP get? | |
$alpha = 'abcdefghijklmnopqrstuvwxyz'; | |
// Note: PHP will run out of memory if you make this range too large | |
for ($i = 1; $i <= 10000; $i++) { | |
$name = str_pad('', $i, $alpha); | |
$count = strlen($name); |
<?php | |
$tasks = json_decode(file_get_contents('http://127.0.0.1:7700/indexes/standards/tasks'), true); | |
$durations = []; | |
$batches = []; | |
$batchDocs = []; | |
foreach ($tasks['results'] as $task) { | |
$uid = $task['uid']; |
<?php | |
$input = $argv[1] ?? 'snippets.csv'; | |
$file = fopen($input, 'r'); | |
$outputDir = pathinfo($input, PATHINFO_FILENAME); | |
$snippetFiles = []; | |
// Make the temp output directory | |
if (! file_exists($outputDir)) { |
<?php | |
$host = 'palindromer-bd7e0fc867d57915.elb.us-east-1.amazonaws.com'; | |
$port = 7777; | |
$socket = fsockopen($host, $port); | |
if (! $socket) { | |
die('Error: connection not successful'); | |
} |
Chrome/Windows: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 | |
Chrome/Windows: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 | |
Chrome/Windows: Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 | |
Chrome/macOS: Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 | |
Chrome/Linux: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36 | |
Chrome/iPhone: Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87.0.4280.77 Mobile/15E148 Safari/604.1 | |
Chrome/iPhone (request desktop): Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/87 Version/11.1.1 Safari/605.1.15 | |
Chrome/iPad: Mozilla/5.0 (iPad; CPU OS 14_3 like Mac OS X) AppleWebKit/605.1.1 |
-- Clear the console | |
hs.console.clearConsole() | |
-- Set the default grid | |
hs.grid.MARGINX = 0 | |
hs.grid.MARGINY = 0 | |
hs.grid.GRIDWIDTH = 20 | |
hs.grid.GRIDHEIGHT = 100 | |
-- Also can be set using hs.grid.setGrid'20x100' |
const phases=[ | |
{"sprite-x":123, "sprite-y":987, phase:"new"}, | |
{"sprite-x":123, "sprite-y":987, phase:"wax-crescent-1"}, | |
{"sprite-x":123, "sprite-y":987, phase:"wax-crescent-2"}, | |
{"sprite-x":123, "sprite-y":987, phase:"wax-crescent-3"}, | |
{"sprite-x":123, "sprite-y":987, phase:"wax-crescent-4"}, | |
{"sprite-x":123, "sprite-y":987, phase:"wax-crescent-5"}, | |
{"sprite-x":123, "sprite-y":987, phase:"wax-crescent-6"}, | |
{"sprite-x":123, "sprite-y":987, phase:"quarter-1"}, | |
{"sprite-x":123, "sprite-y":987, phase:"wax-gibbous-1"}, |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec vitae enim sollicitudin, placerat arcu vitae, https://www.amazon.com/Razor-15120040-Pocket-Rocket-Blue/dp/B001PH9J1I/ref=sr_1_1?keywords=razor+pocket+rocket&qid=1565972694&s=gateway&sr=8-1 tristique urna. Duis vitae commodo felis. Morbi tincidunt magna at turpis porttitor maximus.
Vivamus fermentum rutrum enim vitae ultrices. Pellentesque ac https://www.amazon.com/Razor-15120040-Pocket-Rocket-Blue/dp/B001PH9J1I/ref=sr_1_1?keywords=razor+pocket+rocket&qid=1565972694&s=gateway&sr=8-1 enim at sem aliquet convallis sit amet quis diam. Etiam sodales urna eget varius pretium. Vivamus id eros vehicula mauris auctor dictum sed rhoncus arcu. Pellentesque tincidunt magna lorem, et pretium mi rhoncus in. Mauris erat erat, elementum a congue ut, imperdiet quis turpis.
- Vivamus fermentum rutrum enim vitae ultrices.
- Pellentesque ac https://www.amazon.com/Razor-15120040-Pocket-Rocket-Blue/dp/B001PH9J1I/ref=sr_1_1?keywords=razor+pocke