Skip to content

Instantly share code, notes, and snippets.

View masterxavierfox's full-sized avatar
✌️

Xavier Fox masterxavierfox

✌️
View GitHub Profile
@masterxavierfox
masterxavierfox / ssh-key-login
Created March 14, 2017 11:00
Add ssh key to remote server
ssh-copy-id -i ~/.ssh/id_rsa.pub remote-host
<?php
global $post;
$author_id=$post->post_author;
?>
<?php
/* You can also use one of these instead:
- nickname
- user_nicename
- display_name
@masterxavierfox
masterxavierfox / nginx.conf
Last active September 27, 2016 10:31
Nginx Reverse Proxy Configuration
upstream lucky {
server xfssvsd.co.ke:443;
}
server {
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
ssl_certificate /etc/nginx/ssl/xfssvsd.co.ke/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/xfssvsd.co.ke/privkey.pem;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
@masterxavierfox
masterxavierfox / wp-config.php
Created September 27, 2016 10:05
WordPress: Set WordPress site URL in the config file instead of the database
<?php
// WordPress stores the site URL in the database by default (which I have never
// understood), and it's a pain to have to type out the UPDATE SQL or search in
// phpMyAdmin to change it. This is a simple way to put the URL into
// wp-config.php instead.
// Note that you will still need to update any URLs that appear in the content,
// especially when you copy a database from a development site to production:
// https://gist.github.com/davejamesmiller/a8733a3fbb17e0ff0fb5