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
#!/usr/bin/env php | |
<?php | |
$filename = $argv[1] ?? false; | |
if (!file_exists($filename)) { | |
echo "File not found" . PHP_EOL; | |
exit(1); | |
} | |
$results = []; |
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
#!/bin/bash | |
git status | grep -E "^\s+(modified|new\sfile)" | sed -E "s/.+:\s+//" | tar -cvf test.tar -T - --no-recursion |
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
$options = $I->grabMultiple('#selectID option', 'value'); | |
$I->selectOption('select', $options[array_rand($options)]); |
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
#!/bin/bash | |
ls *.jpg *.png | zip -r archive.zip -@ |
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
#!/bin/bash | |
#rename each file with generated lowercase random 16 character alphanumeric string | |
for i in *.jpg; do mv "$i" "$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1).jpg"; done |