sudo pacman -S wine winetricks
winetricks atmlib gdiplus msxml3 msxml6 vcrun2005 vcrun2005sp1 vcrun2008 ie6 fontsmooth-rgb gecko
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
# Set cache dir | |
proxy_cache_path /var/cache/nginx levels=1:2 | |
keys_zone=microcache:5m max_size=1000m; | |
# Virtualhost/server configuration | |
server { | |
listen 80; | |
server_name yourhost.domain.com; | |
# Define cached location (may not be whole site) |
/* | |
* put this on the very bottom of the functions.php file of your theme | |
* or create manually .maintenance on your web root with desired message | |
*/ | |
// Activate WordPress Maintenance Mode | |
function wp_maintenance_mode(){ | |
if(!current_user_can('edit_themes') || !is_user_logged_in()){ | |
wp_die('<h1 style="color:red">Website under Maintenance</h1><br />We are performing scheduled maintenance. We will be back online shortly!'); | |
} |
#!/usr/bin/env bash | |
# convert sql dumps to csv, tsv, ssv... | |
# also can filter fields using a sed pattern | |
# only works on linux | |
function usage | |
{ | |
echo "usage: $0 [-sc CORES] [-o OUTFILE] [-p PATTERN] SQLFILE" 2>&1 && exit 1 | |
} |
server { | |
listen 80; | |
server_name maxmobiles.lo *.maxmobiles.lo; | |
root /var/www/maxmobiles.lo; | |
error_log /var/www/maxmobiles.lo/log/error.log warn; | |
location / { | |
index index.html index.php; ## Allow a static html file to be shown first |
server { | |
listen 80; | |
listen [::]:80; #Use this to enable IPv6 | |
server_name www.example.com; | |
root /var/www/prestashop17; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
index index.php index.html; |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
# usage | |
# bash install-python-2.7.17.sh | |
sudo apt-get update | |
sudo apt-get install build-essential checkinstall -y | |
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y | |
cd /usr/src | |
sudo wget https://www.python.org/ftp/python/2.7.17/Python-2.7.17.tgz | |
sudo tar xzf Python-2.7.17.tgz | |
cd Python-2.7.17 | |
sudo ./configure --enable-optimizations |
UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl'; | |
UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com'); | |
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com'); | |
UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com'); |