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
CREATE PROCEDURE table_dependents | |
( | |
IN tbl_name varchar(255) | |
) | |
BEGIN | |
CREATE TEMPORARY TABLE tbl_dependents_processing( | |
table_name varchar(255) PRIMARY KEY NOT NULL | |
)ENGINE=MEMORY; | |
INSERT INTO tbl_dependents_processing SELECT DISTINCT TABLE_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_NAME = tbl_name; |
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/sh | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $local_fs $remote_fs $network $syslog $named | |
# Required-Stop: $local_fs $remote_fs $network $syslog $named | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
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
#include <string> | |
#include <iostream> | |
#ifdef _WIN32 | |
#include <WS2tcpip.h> | |
#define LAST_ERR WSAGetLastError() | |
#define SOCK_INVALID(s) s == INVALID_SOCKET | |
#else | |
#define LAST_ERR errno | |
#define SOCK_INVALID(s) s < 0 | |
#include <sys/socket.h> |
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('app/Mage.php'); | |
Mage::app(); | |
$ftpCred = Mage::getStoreConfig('sinchimport_root/sinch_ftp'); | |
Mage::dispatchEvent('sinch_pricerules_import_ftp', array( | |
'ftp_host' => $ftpCred["ftp_server"], | |
'ftp_username' => $ftpCred["login"], | |
'ftp_password' => $ftpCred["password"] | |
)); |
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 | |
if(count($argv) < 4){ | |
echo "No database credentials supplied\n"; | |
exit(1); | |
} | |
$username = $argv[1]; | |
$password = $argv[2]; | |
$db = $argv[3]; |
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('app/Mage.php'); | |
Mage::app(); | |
$attrib = Mage::getSingleton('eav/config')->getAttribute('customer', 'sinch_pricerules_group'); | |
$attrib->setData('used_in_forms', array('adminhtml_customer')); | |
$attrib->save(); |
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 | |
# Top-like script for MySQL | |
DELAY=2 | |
TTY_WIDTH=$(($(stty size | awk '{print $2}')-6)) # determine terminal width | |
TTY_HEIGHT=$(($(stty size | awk '{print $1}')-6)) # determine terminal height | |
while true; do | |
content="Status:\n" |
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 | |
# Simple Magento backup script by Nicka101 <nicka101@cloudbro.net> | |
# Some configuration constants | |
DB_NAME="<YOUR DB NAME>" | |
AZURE_USERNAME="<YOUR AZURE USERNAME>" | |
AZURE_KEY="<YOUR AZURE KEY>" | |
AZURE_CONTAINER="<YOUR (EXISTING) AZURE CONTAINER>" | |
WEBDIR=/var/www/whatever-folder |
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 | |
# names of latest versions of each package | |
export NGINX_VERSION=1.13.1 | |
export VERSION_PCRE=pcre-8.40 | |
export VERSION_LIBRESSL=libressl-2.5.4 | |
export VERSION_NGINX=nginx-$NGINX_VERSION | |
#export NPS_VERSION=1.9.32.10 | |
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta | |
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 python3 | |
# Convert 2160p to 1440p | |
import sys | |
import os | |
from os.path import join, getsize, dirname, basename | |
from subprocess import run, PIPE, STDOUT | |
from time import sleep | |
from collections import namedtuple | |
FFPROBE_BIN = os.getenv('FFPROBE_BINARY', 'ffprobe') |
OlderNewer