Skip to content

Instantly share code, notes, and snippets.

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
@Yonimdo
Yonimdo / WebStormTrialReset.bat
Last active October 26, 2018 10:17
How to Reset InteIIiJ IDEA Evaluation Key in Windows
:: It is Highly Advised to Purchase the JetBrain Softwares
cd "C:%HOMEPATH%\.WebStorm2018.2\config"
rmdir "eval" /s /q
del "options\options.xml"
:: reg QUERY HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\
reg delete HKEY_CURRENT_USER\Software\JavaSoft\Prefs\jetbrains\jetprofile\asset\ws /f
:: It is Highly Advised to Purchase the JetBrain Softwares
:: This is only for the case You just want to Extend the
:: Trial Period and Evaluate the IDE for some more Time
# ----------- Installing -----------------
sudo apt-get && sudo apt-get upgrade -y
sudo apt-get install python3 python3-pip -y
wget https://raw.githubusercontent.com/dokku/dokku/v0.12.13/bootstrap.sh
curl -s https://packagecloud.io/install/repositories/dokku/dokku/script.python.sh | bash
sudo echo "127.0.1.1 dokku.local" > /etc/hosts
sudo hostname yonimdo
sudo DOKKU_TAG=v0.12.13 bash bootstrap.sh
dokku apps:create yonimdo
dokku proxy:ports-set yonimdo http:80:5000
@Yonimdo
Yonimdo / var_editor.html
Created July 25, 2018 15:48
An easy responsive way to change sass variable file. Based in Angluar 1.6
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sass Variables</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.2/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.6/angular.min.js"></script>
<style>
body {
@Yonimdo
Yonimdo / sync_sizes.py
Created July 21, 2018 11:51
prints Images sizes with pill Current folder
import os
import re
from PIL import Image
from pprint import pprint
files = [f for f in os.listdir('.') if os.path.isfile(f)]
list = []
for name in files:
@Yonimdo
Yonimdo / bash-cheatsheet.sh
Created November 2, 2017 12:40 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@Yonimdo
Yonimdo / get_text.py
Created October 30, 2017 12:22
Translate XML or documents with GoogleApiKEY
import os
import requests
import sys
import io
import re
URL = 'https://www.googleapis.com/language/translate/v2?target={}&key=AIzaSyDMkOnUCvBjNg551HafsB2W8UHqCPsKCFg' \
'{}' \
''
@Yonimdo
Yonimdo / android.db.md
Created May 31, 2017 14:44
Exprot db from android

Exprot db from android

adb -d shell "run-as com.example.sagi.translatesms ls /data/data/com.example.sagi.translatesms/databases/

adb -d shell "run-as com.example.sagi.translatesms cat /data/data/com.example.sagi.translatesms/databases/translatesms.db > /sdcard/EXPORTED.db"

adb pull /sdcard/EXPORTED.db .

@Yonimdo
Yonimdo / Menu.java
Created April 27, 2017 14:39
Basic java move function (Like windows)
/*
* the move function lets the buttons move freely across this menuHandler
* panel
*
* NOTICE: at the end the move functions calls the refresh_to_sql_copy
* function Thus updating the SQL static library on real time
*/
private void move(JButton jbutton) {
final JButton tmp = jbutton;
import asyncio
import requests as r
maze = r.post('http://139.59.154.221/')
loop = asyncio.get_event_loop()
tasks = []
assert maze.status_code <= 200
maze = maze.json()
entries = {}
threads = []