Skip to content

Instantly share code, notes, and snippets.

View maagmirror's full-sized avatar
☄️
easteregg

Maag maagmirror

☄️
easteregg
View GitHub Profile
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');
Flexbox big 4:
- display: flex;
- flex-direction
- align-items
- justify-content
add_filter( "login_headerurl", "custom_loginlogo_url" );
function custom_loginlogo_url($url) {
return "https://nibiru.com.uy";
}
function my_login_logo() { ?>
<style type="text/css">
@maagmirror
maagmirror / v-install-wordpress-nibiru
Last active March 1, 2024 17:27
Script to install a wordpress in vesta server with changes in database name generator, add the essential plugins, generate good link structure for seo, change lang of the core to spanish, remove unused base themes
#!/bin/bash
# info: WordPress installer in one command line
# options: DOMAIN USER
#
# Credits to Luka Paunović for wp-cli implememtation
#----------------------------------------------------------#
# Variable&Function #
#----------------------------------------------------------#
function shortcode_nibiru() {
if(is_front_page()){
return '<p>' . get_bloginfo('name') . " " . date('Y') .' <a href="https://nibiru.com.uy" rel="dofollow">Diseño Web Uruguay</a></p>';
}else{
return '<p>' . get_bloginfo('name') . " " . date('Y');
}
}
add_shortcode('nibiru_footer', 'shortcode_nibiru');
#Script to change password in a list of nike+ accounts
#Works for Nike US and Nike EU
#The account file should contain email:password in each line for each account
ACCOUNTFILENAME="nikeemails.txt"
COUNTRY="US"
NEWPASSWORD="j-0k-oiJ-9jnoN0"