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 | |
# Check if resolver IP address is provided as an argument | |
if [ -z "$1" ]; then | |
echo "Usage: $0 <resolver_ip> [<fqdn>]" | |
exit 1 | |
fi | |
resolver_ip=$1 | |
record=shops.myshopify.com |
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
/* | |
* Uses 100ms intervals to check for released lock - super simple | |
* @author Me and ChatGPT | |
*/ | |
class PoboyLock { | |
constructor() { | |
this.lockedKeys = new Set(); | |
} |
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
/** | |
* Watch the spool, delay processing of emails from unrecognized domain names. | |
* | |
* Installation: | |
* npm install nedb | |
* npm install node-windows | |
* node server.js --install {spool_dir} | |
* net start SpamDelayer | |
* | |
* @Author Colin Mollenhour |
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 | |
/* This script generates @method annotations for magento collection classes. | |
* Example: | |
* cd [magento root] | |
* php shell/collections.php | |
* | |
*/ | |
// Init framework | |
require __DIR__.'/../app/Mage.php'; | |
Mage::app(); |
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
#!/bin/bash | |
dir=/root/deadlocks | |
[ -d $dir ] || mkdir -p $dir | |
cd $dir || { echo "Could not cd to $dir"; exit 1; } | |
mysql -be 'show engine innodb status;' \ | |
| sed 's/\\n/\n/g' \ | |
| awk '/TRANSACTIONS/{flag=0}flag;/LATEST DETECTED DEADLOCK/{flag=1}' \ | |
> latest.txt |
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
#!/bin/bash | |
# ################################### | |
# Innodb Snapshot Helper | |
# ################################### | |
# Wrapper around innobackupex to either: | |
# - Take incremental snapshots that are immediately applied to the base snapshot | |
# - Apply a series of incremental snapshots to a base snapshot | |
# - Stream an incremental snapshot | |
# | |
set -e |
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 | |
/** | |
* This rewrite modifies the caching behavior so that the layout cache key references a SHA1 | |
* hash of the layout XML instead of the XML itself to avoid duplication. The layout XML must | |
* still be generated once for each layout key, but it will not be saved if the identical | |
* contents already exist, saving considerable cache backend storage. | |
*/ | |
class Template_Core_Model_Layout_Update extends Mage_Core_Model_Layout_Update | |
{ |
NewerOlder