Skip to content

Instantly share code, notes, and snippets.

View roryashfordbentley's full-sized avatar
🌭
Wranglin'

Rory Ashford-Bentley roryashfordbentley

🌭
Wranglin'
View GitHub Profile
### Keybase proof
I hereby claim:
* I am roryashfordbentley on github.
* I am roikles (https://keybase.io/roikles) on keybase.
* I have a public key ASAvcs_8wWHe_gT0Z14fd1tT5Dp6dViQSsy6-IFf9ZUfLgo
To claim this, I am signing this object:
<?php
function mixd_allowed_block_types($allowed_blocks)
{
return array(
'core/paragraph',
//'core/image',
'core/heading',
'core/gallery',
'core/list',
'core/quote',
@roryashfordbentley
roryashfordbentley / htaccess.txt
Created February 23, 2017 10:51
Use assets from liveserver without having to download them all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /mysite/
RewriteCond %{REQUEST_FILENAME} !-f [NC]
RewriteRule ^app/uploads/(.*)$ http://mysite.com/app/uploads/$1 [R=301,L]
</IfModule>
@roryashfordbentley
roryashfordbentley / customizer.php
Last active February 6, 2017 13:44
Customizer problem
<?php
// Add field
$wp_customize->add_section( 'my_options', array(
'title' => 'My Options',
'priority' => 50,
) );
$wp_customize->add_setting( 'admin_bar_setting', array(
'default' => false,
@roryashfordbentley
roryashfordbentley / Package.json
Last active June 9, 2016 12:41
Package.json example with some set variables
{
"name": "FlexbonesBuild",
"version": "5.0.0",
"description": "Watch sass,js and deploy",
"author": "Rory Ashford <rory@roikles.com>",
"config": {
"theme": "wp-content/themes/flexbones",
"sass":"wp-content/themes/flexbones/assets/sass/style.scss",
"sassfolder":"wp-content/themes/flexbones/assets/sass",
"css":"wp-content/themes/flexbones/style.css",
@roryashfordbentley
roryashfordbentley / sublime-settings
Last active June 9, 2016 10:38
Sublime settings
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"caret_extra_bottom": 1,
"caret_extra_top": 1,
"caret_extra_width": 2,
"caret_style": "blink",
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Ocean.tmTheme",
"folder_exclude_patterns":
[
@roryashfordbentley
roryashfordbentley / dots.js
Last active November 12, 2015 09:54
First attempt at OOJS
/**
* dots.js
* Create dots for the explosion animation
* on the homepage
*/
/**
* generates random dots within a circular outline
*
@roryashfordbentley
roryashfordbentley / General Rules
Last active October 28, 2015 15:22
Wordpress Security scripts for better protection. Add as needed to .htaccess
1. DO NOT use 'admin/administrator/website-name/company-name' as your WordPress username
2. DO generate a secure password
3. DO create your own themes so you can ensure they are clean
4. DO check plugin reviews and check they are actively maintained
5. DO Keep regular backups
6. DO NOT push `wp-config.php` to a public Git Repository
7. DO use a custom database prefix instead of the default `wp_`
8. DO use a custom Directory structure
9.
@roryashfordbentley
roryashfordbentley / filebot-utorrent
Created October 9, 2015 17:22
Filebot uTorrent Script
filebot.launcher.exe -script fn:amc --output "D:/" --log-file amc.log --action move --conflict override -non-strict --def "seriesFormat=D:/TV Shows/{n}/{'S'+s}/{fn}" "movieFormat=D:/Movies/{n} {y}/{fn}" music=n subtitles=en artwork=n backdrops=n clean=y plex=127.0.0.1:32400 "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
filebot -rename "D:\to sort" --db TheTVDB --action move --conflict override -non-strict -r --output "D:\TV Shows" --format "{n}/{'S'+s}/{fn}" --log all