Skip to content

Instantly share code, notes, and snippets.

View richjenks's full-sized avatar
🏍️

Rich Jenkins richjenks

🏍️
View GitHub Profile
background: repeating-linear-gradient(
45deg,
#606dbc,
#606dbc 10px,
#465298 10px,
#465298 20px
);
<VirtualHost *:80>
ServerName localhost
DocumentRoot /var/www/site
<Directory /var/www/site>
Options Indexes FollowSymLinks
Require all granted
AllowOverride All
</Directory>
</VirtualHost>
<?php
define('ABSPATH', '/var/www/wordpress/');
require ABSPATH.'wp-includes/pluggable.php';
echo wp_hash_password('new_password');
# Make list of installed locales the same as all supported locales
sudo cp /usr/share/i18n/SUPPORTED /var/lib/locales/supported.d/local
# Generates locales
sudo locale-gen
# List installed locales
locale -a
# ~/.bas_aliases
alias l="ls -alhgc"
alias update="sudo apt-get update && sudo apt-get upgrade"
alias apache="sudo service apache2"
alias google-chrome="google-chrome-stable"
alias glog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit -n"
@richjenks
richjenks / regex-curriculum.md
Created April 16, 2016 07:45
Regex Curriculum

Basics

  • Text match
  • Asterisks & Pluses
  • Question Marks
  • Pipe Options
  • Character Groups
  • Character Ranges
  • Range Shorthand
  • Counting Characters
  • Replacement
@richjenks
richjenks / .htaccess
Last active April 16, 2016 07:17
Clean URLs
<IfModule mod_rewrite.c>
# Force https
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Remove www.
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
@richjenks
richjenks / countries.md
Last active November 20, 2025 19:18
ISO 3166 countries by region — AMER, EMEA & APAC
Country ISO 3166 Region
Afghanistan AF EMEA
Åland Islands AX EMEA
Albania AL EMEA
Algeria DZ EMEA
American Samoa AS APAC
Andorra AD EMEA
Angola AO EMEA
Anguilla AI AMER
@richjenks
richjenks / readme.md
Created November 21, 2015 11:54
Responsive Captivate template

Responsive Captivate

Responsive template for Adobe Captivate projects.

Installation

Move standard.htm to the following two locations, backing-up the original files:

  • C:\Program Files (x86)\Adobe\Adobe Captivate 5\Templates\Publish\
  • C:\Program Files (x86)\Adobe\Adobe Captivate 5\Templates\Publish\SCORM\1_2\
@richjenks
richjenks / zendesk-newlines.js
Created November 19, 2015 09:54
Makes ZenDesk honour newlines added to field descriptions
setTimeout(function () {
var descriptions = $(".form-field p");
descriptions.each(function (index, value) {
$(this).html($(this).html().replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g, "<br>"));
});
}, 10);