Skip to content

Instantly share code, notes, and snippets.

View gearoidc's full-sized avatar
🏠
Working above the clouds

Gearoid Coughlan gearoidc

🏠
Working above the clouds
View GitHub Profile
@gearoidc
gearoidc / csr_decode
Created September 27, 2013 21:26
decode a CSR
openssl req -in your.csr -noout -text
@gearoidc
gearoidc / ip deny
Last active December 28, 2015 08:39
block ip address using .htaccess
deny from nnn.nnn.nnn.nnn
@gearoidc
gearoidc / ntp
Last active December 28, 2015 20:59
Updating date / time with NTP
sudo service ntp stop
sudo ntpdate -s time.nist.gov
sudo service ntp start
sudo service ntp stop ; sudo ntpdate -s time.nist.gov ; sudo service ntp start
@gearoidc
gearoidc / mysql optimize
Created November 22, 2013 14:54
mysql client command to optimize tables
$ mysql -u <username> -p -Bse 'show tables' <dbname> | xargs | perl -pe 's/ /,/g'
$ mysql -u <username> -p -Bse 'optimize tables <comma seperated list of tables>' <dbname>
### Keybase proof
I hereby claim:
* I am gearoidc on github.
* I am gearoidc (https://keybase.io/gearoidc) on keybase.
* I have a public key whose fingerprint is A656 1504 BB93 6CFB DFCE 1AD8 2085 1F44 0387 491F
To claim this, I am signing this object:
### Keybase proof
I hereby claim:
* I am gearoidc on github.
* I am gearoidc (https://keybase.io/gearoidc) on keybase.
* I have a public key ASAmCF7Mx8KIvQYcYhp6bPOgJTowhwfI9STNZjgNfEIjCQo
To claim this, I am signing this object:
@gearoidc
gearoidc / reset_wp_password.txt
Last active April 3, 2019 08:13
Reset WP password on command line
Source: https://www.tecmint.com/reset-wordpress-admin-password-via-mysql-command/
$ echo -n "newpass" | md5sum
CREATE USER USER@HOST IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
GRANT ALL PRIVILEGES ON database.* to USER@HOST;
flush privileges;