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 | |
set -e | |
if [[ "$#" -ne 1 ]] || [[ $1 = '--help' ]]; then | |
echo "This script can be used to update the password type for users with the mysql_native_password plugin." | |
echo "Usage: $0 <mysql_container_name> [username]" | |
exit 1 | |
fi |
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 | |
if [[ -z $1 ]] || [[ $1 = "--help" ]]; then | |
echo "Usage: $0 <resolver_ip> [<fqdn> [<docker_container>]]" | |
exit 1 | |
fi | |
resolver_ip=$1 | |
record=shops.myshopify.com | |
if [[ -n $2 ]]; then |
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 |
NewerOlder