Skip to content

Instantly share code, notes, and snippets.

View TheSkyNet's full-sized avatar

Kev The Dev TheSkyNet

View GitHub Profile
@TheSkyNet
TheSkyNet / .htaccess
Created April 2, 2018 22:05 — forked from dr-dimitru/.htaccess
.htaccess file for Laravel 4 and Laravel 3 | For root/ folder
# ----------------------------------------------------------------------
# ROOT/ folder .htaccess
# ----------------------------------------------------------------------
# Laravel Note:
# Note: Laravel is designed to protect your application code,
# and local storage by placing only files that are necessarily
# public in the public folder. It is recommended that you either
# set the public folder as your site's documentRoot (also known as a web root)
# or to place the contents of public into your site's root directory
# and place all of Laravel's other files outside the web root.
@TheSkyNet
TheSkyNet / wordpress-change-domain-migration.sql
Created April 2, 2018 20:24 — forked from chuckreynolds/wordpress-change-domain-migration.sql
Use this SQL script when changing domains on a WordPress site. Whether you’re moving from an old domain to a new domain or you’re changing from a development domain to a production domain this will work. __STEP1: always backup your database. __STEP2: change the ‘oldsite.com’ and ‘newsite.com’ variables to your own. __STEP3: make sure your databa…
SET @oldsite='http://oldsite.com';
SET @newsite='http://newsite.com';
UPDATE wp_options SET option_value = replace(option_value, @oldsite, @newsite) WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET post_content = replace(post_content, @oldsite, @newsite);
UPDATE wp_links SET link_url = replace(link_url, @oldsite, @newsite);
UPDATE wp_postmeta SET meta_value = replace(meta_value, @oldsite, @newsite);
/* only uncomment next line if you want all your current posts to post to RSS again as new */
#UPDATE wp_posts SET guid = replace(guid, @oldsite, @newsite);
@TheSkyNet
TheSkyNet / kill_dat_querey,sh
Created April 3, 2017 10:45
kill dat querey
#FIND
#SELECT id,state,command,time,left(replace(info,'\n','<lf>'),120)
#FROM information_schema.processlist
#WHERE command <> 'Sleep'
#AND info NOT LIKE '%PROCESSLIST%'
#ORDER BY time DESC LIMIT 50;
host="octopus-read-1"
password=XXXXXXX
/**
* @return bool
* @throws Exception
*/
public function isAuthenticationRequired()
{
return false;
}
@TheSkyNet
TheSkyNet / gist:109334aa55db9bf3bd02021aa5268da2
Created September 14, 2016 09:23
Little Bobby Drop Tables
sudo mysql -uroot -ppassword -e "show databases" |
grep -v Database |
grep -v mysql|
grep -v information_schema|
grep -v test |
gawk '{print "drop database " $1 ";"}' |
mysql -uroot -ppassword
@TheSkyNet
TheSkyNet / Animated Weather Icons.markdown
Last active August 29, 2015 14:23
Animated Weather Icons

Weather Icons