Skip to content

Instantly share code, notes, and snippets.

View eyvoro's full-sized avatar
🏠
Working from home

eyvoro

🏠
Working from home
View GitHub Profile
@eyvoro
eyvoro / nginx-rewrites-yoast-wordpress-seo
Created September 14, 2016 09:41 — forked from SimpleHomelab/nginx-rewrites-yoast-wordpress-seo
Nginx rewrites for Yoast's WordPress SEO plugin. These rewrites go into the Nginx host file between the server blocks.
# This rewrite redirects sitemap.xml to sitemap_index.xml, which is what Yoast's WordPress SEO plugin generates.
rewrite ^/sitemap\.xml$ /sitemap_index.xml permanent;
# This rewrite ensures that the styles are available for styling the generated sitemap.
rewrite ^/([a-z]+)?-?sitemap\.xsl$ /index.php?xsl=$1 last;
# These rewrites rule are generated by Yoast's plugin for Nginx webserver
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
from random import randrange
from twisted.internet.defer import DeferredQueue
from twisted.internet.task import deferLater, cooperate
from twisted.internet import reactor
def async(n):
print 'Starting job', n
d = deferLater(reactor, n, lambda: None)
@eyvoro
eyvoro / bash_shortcuts.txt
Created March 1, 2013 11:47
BASH shortcuts
Ctrl-a Move to the start of the line.
Ctrl-e Move to the end of the line.
Ctrl-b Move back one character.
Alt-b Move back one word.
Ctrl-f Move forward one character.
Alt-f Move forward one word.
Ctrl-] x Where x is any character, moves the cursor forward to the next occurance of x.
Alt-Ctrl-] x Where x is any character, moves the cursor backwards to the previous occurance of x.
Ctrl-u Delete from the cursor to the beginning of the line.
Ctrl-k Delete from the cursor to the end of the line.