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 | |
#read db credentials from wp-config.php | |
source <(php -r 'require("wp-config.php"); echo("DB_NAME=".DB_NAME."; DB_USER=".DB_USER."; DB_PASSWORD=".DB_PASSWORD."; TABLE_PREFIX=".$table_prefix); ') | |
#dump wp db on wpdb_backup_$DB_NAME.sql | |
mysqldump --user $DB_USER --password="$DB_PASSWORD" $DB_NAME > wpdb_backup_$DB_NAME.sql | |
#find and replace $table_prefix | |
sed -i 's/$TABLE_PREFIX/wp_/g' wpdb_backup_$DB_NAME.sql |
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
INSERT INTO `twizwebzyio_1568661505`.`wp_users` (`ID`, `user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_activation_key`, `user_status`, `display_name`) VALUES ('4', 'markt', MD5('markt'), 'Mark Tiempo', '[email protected]', 'http://www.test.com/', '2019-09-017 00:00:00', '', '0', 'Mark Tiempo'); | |
INSERT INTO `twizwebzyio_1568661505`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
INSERT INTO `twizwebzyio_1568661505`.`wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) VALUES (NULL, '4', 'wp_user_level', '10'); |
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
const {app, BrowserWindow} = require('electron') // http://electron.atom.io/docs/api | |
let window = null | |
// Wait until the app is ready | |
app.once('ready', () => { | |
// Create a new window | |
window = new BrowserWindow({ | |
// Set the initial width to 800px | |
width: 800, |
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
sfdx force:package:create -p mvcti -d force-app --wait 10 -v markmonster -x | |
sfdx force:package:version:create -p mvcti -d force-app --wait 10 -v markmonster -x | |
sfdx force:package:version:promote --package [email protected] -v markmonster | |
sfdx force:package:install --wait 10 --publishwait 10 --package [email protected] -r -u markmonster |
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
users = jsonf_to_list('en_users.json') | |
uid_map = map(lambda user: user['id'], users) | |
user_list = list(uid_map) | |
user_ids = list(filter(None, user_list)) | |
def search_dict_list(dict_list, dict_id): | |
return next((item for item in dict_list if item["id"] == dict_id), None) | |
def jsonf_to_list(filename): | |
with open(filename, 'r') as f: | |
thelist = json.load(f) |
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
sudo su && | |
cd && | |
wget https://prosody.im/files/prosody-debian-packages.key -O- | sudo apt-key add - && | |
echo deb http://packages.prosody.im/debian $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list && | |
apt-get update -y && | |
apt-get upgrade -y && | |
apt-get install prosody -y && | |
chown root:prosody /etc/prosody/certs/localhost.key && | |
chmod 644 /etc/prosody/certs/localhost.key && | |
cp /etc/prosody/certs/localhost.key /etc/ssl && |
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
sudo su | |
cd && | |
apt-get update -y && | |
apt-get install gcc -y && | |
apt-get install unzip -y && | |
apt-get install lua5.2 -y && | |
apt-get install liblua5.2 -y && | |
apt-get install luarocks -y && | |
luarocks install basexx && |
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
from aiohttp import ClientSession, TCPConnector | |
import asyncio | |
import sys | |
import pypeln as pl | |
import csv | |
limit = 1000 | |
def csv2list(file): | |
results = [] | |
with open(file, newline='') as inputfile: |
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
''' | |
src: https://stackoverflow.com/a/46098711/2433866 | |
''' | |
import sys | |
import logging | |
import logging.handlers | |
logging.basicConfig( | |
level=logging.INFO, | |
format="[%(asctime)s] %(levelname)s in %(module)s: %(message)s", |
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 | |
PHP_VERSION=7.4 | |
IONCUBE_VERSION=12.0.2 | |
TESTRAIL_DB_NAME=testrail | |
TESTRAIL_DB_USER=testrail | |
TESTRAIL_DB_PASSWORD=testrail | |
DEBIAN_FRONTEND=noninteractive | |
echo "Updating Software" |
OlderNewer