I hereby claim:
- I am rcro on github.
- I am rcro (https://keybase.io/rcro) on keybase.
- I have a public key whose fingerprint is 1D47 F42B C687 6479 BC95 FD1F 9BC2 AE65 3AAE D6FC
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| /* | |
| * Magento 1 Valet Driver | |
| * @author spinsch | |
| * @path ~/.valet/Drivers/Magento1ValetDriver.php | |
| */ | |
| class Magento1ValetDriver extends ValetDriver | |
| { | |
| /** | |
| * Determine if the driver serves the request. |
| <?php | |
| /** | |
| * convert magento translation file to ios STRING file | |
| * to use the google translation toolkit | |
| * | |
| * usage: php convert.php translation.csv > translation.STRINGS | |
| * php convert.php translation.STRINGS > translation.csv | |
| * | |
| * @author rcro <[email protected]> | |
| */ |
| <?php | |
| function return_bytes($val) { | |
| $val = trim($val); | |
| $last = strtolower($val[strlen($val)-1]); | |
| switch($last) { | |
| // The 'G' modifier is available since PHP 5.1.0 | |
| case 'g': | |
| $val *= 1024; | |
| case 'm': |
| https://www.netflix.com/browse/genre/<GENRE-CODE>/ | |
| Action & Adventure (1365) | |
| Asian Action Movies (77232) | |
| Classic Action & Adventure (46576) | |
| Action Comedies (43040) | |
| Action Thrillers (43048) | |
| Adventures (7442) | |
| Comic Book and Superhero Movies (10118) | |
| Westerns (7700) |
| <?php | |
| header("Content-type: text/plain"); | |
| echo "array(\n"; | |
| foreach (new NoRewindIterator(new SplFileObject('https://data.iana.org/TLD/tlds-alpha-by-domain.txt')) as $i => $v) { | |
| if ($i == 0) {continue;}; | |
| echo "\040\040\040\040'".idn_to_utf8(trim(strtolower($v)))."',\n"; | |
| } | |
| echo ");"; |
| <?php | |
| // debug script | |
| // apiDoc: https://devdocs.magento.com/guides/m1x/api/soap/checkout/checkout.html | |
| $proxy = new SoapClient('http://lts.localhost/api/v2_soap/?wsdl'); | |
| $sessionId = $proxy->login('debug', 'debug123'); | |
| // create cart |
$ uname -r
| <?php | |
| // this is for schema http://www.sitemaps.org/schemas/sitemap/0.9 | |
| // config | |
| $lastNElements = 20; | |
| // url or filepath | |
| //$source = 'https://www.digitec.ch/sitemap0.xml'; |
| <?php | |
| $data = "123456"; | |
| $key = "17839778773fadde0066e4578710928988398877bb123789"; | |
| $options = 0; | |
| $key = pack("H*", $key); | |
| foreach (openssl_get_cipher_methods() as $method) | |
| { | |
| $enc = @openssl_encrypt($data, $method, $key, $options); |