Skip to content

Instantly share code, notes, and snippets.

View steverobbins's full-sized avatar

Steve Robbins steverobbins

View GitHub Profile
\[Gold Star Foods\$([a-z ]+)\] +(AS )?([a-z0-9]+)
' . table_name('gsf', '$1', '$3') . '
#!/usr/bin/env python
import subprocess
import sys
import re
bin_vbox = '/usr/local/bin/VBoxManage'
box = 'archiveteam-warrior-2'
def main():
select eet.entity_type_code, sf.store_id, max(sf.increment_id) real_increment_last_id, ees.increment_last_id, if(ees.increment_last_id >= max(sf.increment_id), 'Yes', 'No') healthy
from sales_flat_shipment sf
inner join eav_entity_store ees on ees.store_id = sf.store_id
inner join eav_entity_type eet on eet.entity_type_id = ees.entity_type_id
where eet.entity_type_code = 'shipment'
group by sf.store_id, eet.entity_type_code
union all
select eet.entity_type_code, sf.store_id, max(sf.increment_id) real_increment_last_id, ees.increment_last_id, if(ees.increment_last_id >= max(sf.increment_id), 'Yes', 'No') healthy
from sales_flat_invoice sf
inner join eav_entity_store ees on ees.store_id = sf.store_id
#!/bin/bash
SOURCE=/Volumes/Session0/DCIM
DEST=/Volumes/HomeVideo
DRY=$1
if [ ! -d "$SOURCE" ]; then
echo "Source directory '$SOURCE' does not exist"
exit 1
fi
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/osl-3.0.php
@steverobbins
steverobbins / archive.sh
Last active April 1, 2020 18:42
Quick and dirty script to save a whole site to archive.org
#!/bin/bash
URL=$1
PATH=$2
EXCLUDE=$3
/bin/rm -rf "$URL"
echo "Gathering URLs..."
<?php
$data = [
[112, 'BLA'],
[112, 'BLK'],
[113, 'blu'],
[113, 'BLU'],
[113, 'DNVY'],
[113, 'MAU'],
[113, 'NAV'],
insert into mage_catalog_product_entity_text (entity_type_id, attribute_id, store_id, entity_id, value)
select 4, 251, 0, entity_id, '67,68'
from mage_catalog_product_entity
where sku in ('10001','10037','10038','10041','10043','10049','10059','10063','10079','10081','10082','10084','10085','10088','10091','10092','10103','10104','10105','10107','10114','10132','10136','10137','10138','10142','10143','10144','10151','10153','10159','10160','10163','10165','10171','10173','10180','10181','10185','10186','10188','10189','10190','10195','10206','10207','10209','10212','10213','10224','10235','10241','10243','10244','10246','10247','10283','10287','10310','10320','10356','10362','10374','10393','10403','10405','10428','10436','10465','10467','10475','10483','10488','10489','10494','10495','10498','10502','10505','10509','10523','10528','10529','10535','10560','10573','10576','10596','10597','10598','10603','10607','10609','10610','10611','10612','10613','10614','10615','10616','10617','10618','10619','10620','106
<?php
define('THRESHOLD', 0.1);
// [address 1, address 2, should trigger fraud?]
$tests = [
// Addresses are exactly the same
[
[
'street' => '16555 Von Karman Ave',

Keybase proof

I hereby claim:

  • I am steverobbins on github.
  • I am steverobbins (https://keybase.io/steverobbins) on keybase.
  • I have a public key whose fingerprint is F665 C5A4 EAC2 A9E1 FDF1 9766 34BF D94C 4F19 CE38

To claim this, I am signing this object: