Skip to content

Instantly share code, notes, and snippets.

View jamesstacyjones's full-sized avatar

Stacy Jones jamesstacyjones

View GitHub Profile
@jamesstacyjones
jamesstacyjones / gist:1df990bdf424ac1e42779b149a009754
Created August 5, 2017 14:55
mysql set root@localhost with grant privileges
grant all privileges on *.* to root@localhost identified by 'the password' with grant option;
flush privileges;
@jamesstacyjones
jamesstacyjones / gist:c70e38c69eca0806305e5426f9140907
Last active May 30, 2018 13:24
Command line to find large files in linux
Find top 20 largest files starting at root directory
du --exclude=/proc* -a / | sort -n -r | head -n 20
List the size of of the folders in the current directory
du -hsx * | sort -rh | head -10
Checks processes that are keeping deleted files open
lsof -s | grep deleted | sort -k 8
Check rotation of error logs ... as it is not working large files are being created
@jamesstacyjones
jamesstacyjones / gist:ae659c2142ea9ed48d029d93a6576e70
Created August 20, 2016 13:26
Change files & directories with executable ... change back to normal
find / -type f -perm /a+x -exec chmod 0644 {} \;
find / -type d -perm /a+x -exec chmod 0755 {} \;
@jamesstacyjones
jamesstacyjones / gist:1a77649f24a81c7d7294
Created May 1, 2015 12:54
Remove Line Breaks from a Cell in Google Sheets
Copy this Regular Expression into Find / Replace:
\r\n|\n|\r
Then click 'Replace All' and bye bye line breaks.
[note] make sure there is no white space before or after the expression
@jamesstacyjones
jamesstacyjones / gist:9ce429d82511ff7fc1bf
Last active August 29, 2015 14:19
Change all files and folder recursively.
sudo find foldername -type d -exec chmod 775 {} ";"
sudo find foldername -type f -exec chmod 664 {} ";"
@jamesstacyjones
jamesstacyjones / gist:7d6bd4e6067c31b5afea
Last active August 29, 2015 14:02
wordpress :: deactivate all plugins by db
UPDATE wp_options SET option_value = ' a:0:{}' WHERE option_name = 'active_plugins';
@jamesstacyjones
jamesstacyjones / gist:5d5b9c44028249a290e8
Last active August 29, 2015 14:00
propel :: get last query executed.
echo Propel::getConnection()->getLastExecutedQuery();
@jamesstacyjones
jamesstacyjones / gist:0988723ac1e13231cffc
Created April 30, 2014 21:01
clearfix : let my float go
.clearfix:before,
.clearfix:after {
content: "";
display: table;
}
.clearfix:after {
clear: both;
}
@jamesstacyjones
jamesstacyjones / gist:7196145
Last active December 26, 2015 18:39
find foreign key constraint errors.
SELECT constraint_name, table_name FROM information_schema.table_constraints WHERE constraint_type = 'FOREIGN KEY' AND table_schema = DATABASE() ORDER BY constraint_name;