MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to: Sublime Text
Make it executable with: chmod u+x Sublime\ Text
# | |
# Name: nginx-tls.conf | |
# Auth: Gavin Lloyd <[email protected]> | |
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating | |
# | |
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related | |
# to SSL/TLS are not included here. | |
# | |
# Additional tips: | |
# |
Homebrew is a package management system for OS X. You can read more about it here, or simply run
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
to install it.
I am running a WordPress multisite network with sub-directory setup. When I check my error.log file, it is full of entries like this one:
Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'Limit InternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
The problem was, in my case, one specific rewrite rule in the .htaccess file.
def degrees_to_cardinal(d): | |
''' | |
note: this is highly approximate... | |
''' | |
dirs = ["N", "NNE", "NE", "ENE", "E", "ESE", "SE", "SSE", | |
"S", "SSW", "SW", "WSW", "W", "WNW", "NW", "NNW"] | |
ix = int((d + 11.25)/22.5) | |
return dirs[ix % 16] |
DROP TABLE IF EXISTS wp_users; | |
CREATE TABLE wp_users ( | |
ID bigint(20) unsigned NOT NULL auto_increment, | |
user_login varchar(60) NOT NULL default '', | |
user_pass varchar(64) NOT NULL default '', | |
user_nicename varchar(50) NOT NULL default '', | |
user_email varchar(100) NOT NULL default '', | |
user_url varchar(100) NOT NULL default '', | |
user_registered datetime NOT NULL default '0000-00-00 00:00:00', | |
user_activation_key varchar(60) NOT NULL default '', |
/** | |
* Show draft and private pages in hierarchicial Parent pages dropdown. | |
* will work for any hier. post type. | |
*/ | |
function filter_attributes_dropdown_pages_args($dropdown_args) { | |
$dropdown_args['post_status'] = array('publish','draft', 'private'); | |
return $dropdown_args; | |
} | |
add_filter('page_attributes_dropdown_pages_args', __NAMESPACE__ . '\\filter_attributes_dropdown_pages_args', 100, 1); |
$doc = [xml]'<opml version="2.0"><body/></opml>' | |
$body = $doc.selectSingleNode('//body') | |
# somafm.com channels.. | |
foreach($ch in (irm http://somafm.com/channels.xml).selectNodes('//channels/*')) { | |
$x = $doc.createElement('outline') | |
$x.setAttribute('text', "SomaFM - $($ch.title.innerText)") | |
$x.setAttribute('description', $ch.description.innerText) | |
$x.setAttribute('category', "$($ch.genre)/AAC/128k/") | |
$x.setAttribute('type', 'link') |
--- | |
layout: null | |
--- | |
{ | |
"version": "https://jsonfeed.org/version/1", | |
"title": {{ site.name | jsonify }}, | |
"home_page_url": "{{ site.baseurl }}/", | |
"feed_url": "{{ site.baseurl }}/feed.json", | |
"description": {{ site.tagline | jsonify }}, | |
"favicon": "{{ site.baseurl }}/assets/icons/favicon-96x96.png", |