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
<?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
#!/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 | |
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 | |
# 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
Get a copy of the linux kernel source you intend to build | |
Install u-boot-tools, gcc-aarch64-linux-gnu, g++-aarch64-linux-gnu device-tree-compiler libncurses-dev (packages names on debian-based systems) | |
You also need native compiler tools available, such as build-essential | |
Add the following to arch/arm64/boot/dts/allwinner/Makefile: | |
dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h5-orangepi-pc2.dtb | |
If they allwinner folder doesn't exist, get the patches necessary to create it (and its friends) from mainline kernel, linux-sunxi, etc, etc | |
Add the attached dts, dtsi and defconfig files to the locations specified below: | |
dts & dtsi --> arch/arm64/boot/dts/allwinner/ | |
defconfig --> arch/arm64/config/ | |
Run the following (from the root of the kernel tree): |
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
#!/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 | |
OlderNewer