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
// gcc -O2 -Wall -pedantic process-mysqldump.c -o process-mysqldump | |
// Usage: cat dump.sql | process-mysqldump | |
// Or : process-mysqldump dump.sql | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <string.h> | |
#define BUFFER 100000 |
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 bash | |
set -e | |
MODMAN="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/modman" | |
TMPDIR=$(mktemp -d) | |
function cleanup () { | |
rm -rfv "$TMPDIR" | |
} | |
trap cleanup EXIT |
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
<?php | |
require_once 'abstract.php'; | |
class Mage_Shell_CheckImages extends Mage_Shell_Abstract | |
{ | |
const CATALOG_PRODUCT = '/catalog/product'; | |
const CACHE = '/cache/'; | |
public function run() |
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 | |
// | |
// PHP REPL with initialized Magento environment | |
// | |
// Thanks to https://github.com/d11wtq/boris | |
// | |
// Run this script anywhere in the Magento directory tree to start the REPL | |
// |
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 awk -f | |
BEGIN { | |
FS="," | |
rows[""]=0 | |
rowsc[""]=0 | |
labels[""]=0 | |
} | |
{ | |
if (NR == 1) { header=$0; cols=NF; } |