Skip to content

Instantly share code, notes, and snippets.

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

Will Presley WillPresley

🏠
Working from home
View GitHub Profile
@vertexclique
vertexclique / cracking.md
Last active February 22, 2025 13:20
Cracking guide for Sublime Text 3 Build 3059 / 3065 ( Mac / Win x86_64 / Windows x86 / Linux x64 / Linux x86 )

MacOS

Build 3059

MD5: 59bab8f71f8c096cd3f72cd73851515d

Rename it to: Sublime Text

Make it executable with: chmod u+x Sublime\ Text

@gavinhungry
gavinhungry / nginx-tls.conf
Last active March 7, 2025 19:38
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# 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:
#
@indiesquidge
indiesquidge / homebrew.md
Last active January 28, 2025 14:23
How to and Best of Homebrew

Homebrew

How To

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.

@JustThomas
JustThomas / wordpress-multisite-internal-redirect-loop.md
Last active October 9, 2024 00:00
WordPress Multisite: How to fix error "too many redirects"

WordPress Multisite: How to fix error "Request exceeded the limit of 10 internal redirects"

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.

Problem description

@RobertSudwarts
RobertSudwarts / deg_to_cardinal.py
Created June 7, 2015 16:18
[python] degrees to cardinal directions
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]
@rnagle
rnagle / wpdb_default_tables.sql
Last active March 28, 2024 22:37
Default WordPress Database Table Create Statements
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 '',
@wkw
wkw / wp-parent-page-filter.php
Created October 25, 2016 18:23
WordPress: allow draft, private posts to be selected in Parent page dropdown
/**
* 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);
@gfody
gfody / stations.ps1
Created January 29, 2017 03:29
Import Digitally Imported and SomaFM radio stations into MusicBee
$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",
@MoOx
MoOx / README.md
Last active May 11, 2023 13:59
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily