This file contains hidden or 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
Variant.where({:is_master => false}).each { |v| Variant.where({:sku => v.sku}).where(['id != ?', v.id]).where({:is_master => false}).delete_all } |
This file contains hidden or 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 python | |
import contextlib, os, finalize_vm, subprocess | |
backup_path = '/mnt/backup/tmp/backup' | |
@contextlib.contextmanager | |
def flock(path): | |
while True: | |
try: |
This file contains hidden or 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 python | |
import json | |
import sys | |
har = open(sys.argv[1]) | |
parsed = json.load(har) | |
parsed['request']['url'] = '/'+'/'.join(parsed['request']['url'].split('/')[3:]) | |
response = '%(method)s %(url)s %(httpVersion)s\r\n' % parsed['request'] |
NewerOlder