Skip to content

Instantly share code, notes, and snippets.

View RiFi2k's full-sized avatar

Reilly Lowery RiFi2k

View GitHub Profile
<!doctype html>
<html>
<head>
<title>Example Add to Library Button</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
</head>
<body>
<div class="container mt-5">
<form id="apple_music_form">
<label for="apple_music_email_address">Email Address</label>
@RiFi2k
RiFi2k / img_404_change_url.conf
Last active January 12, 2019 04:07
Nginx change img url on 404
location ~* (/[^/]+/)?uploads/(.+\.(png|gif|jpe?g)) {
try_files $uri $uri/ /index.php?q=$uri&$args;
expires max;
log_not_found off;
access_log off;
}
location ~ ^(.*)\/wp-content\/uploads\/(.*)$ {
try_files $uri @missing;
}
@RiFi2k
RiFi2k / arch-usb-uefi.md
Created December 1, 2018 04:40 — forked from elerch/arch-usb-uefi.md
Installation of Arch Linux on a USB stick with UEFI and legacy BIOS Support

Our goal here is to have one USB stick to rule them all. Objectives:

  • We want a full system - not a live CD
  • We want to boot this system on a Macbook Pro (requires UEFI)
  • We want to boot this system on a Acer C720 Chromebook (requires Legacy BIOS support)
  • We want the system "functional"

The last bullet is subject to interpretation, but I'm defining functional as:

  • X Windows works (with LXDE)
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# WordPress Coding Standards
# http://make.wordpress.org/core/handbook/coding-standards/
root = true
[*]
charset = utf-8
<!doctype html>
<html>
<head>
<title>Example Add to Library Button</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
</head>
<body>
<div class="container mt-5">
<form id="apple_music_form">
<label for="apple_music_email_address">Email Address</label>
{
"require": {
"php": ">=7.1.3",
"web-token/jwt-framework": "^1.1"
}
}
/**
* Generate a signed JWT for Apple Music API
* Need to include this linked composer.json
* https://gist.github.com/RiFi2k/807a8d8de14d34db8455e8440eed528a
*/
use Jose\Component\KeyManagement\JWKFactory;
use Jose\Component\Core\AlgorithmManager;
use Jose\Component\Core\Converter\StandardConverter;
use Jose\Component\Signature\Algorithm\ES256;
use Jose\Component\Signature\JWSBuilder;
add_filter( 'script_loader_tag', 'remove_site_scripts', 999, 3 );
function remove_site_scripts( $tag, $handle, $src ) {
global $pagename;
if ( 'login' === $pagename ) {
$tag = '';
}
return $tag;
}
add_filter( 'style_loader_tag', 'remove_site_styles', 999, 4 );
@RiFi2k
RiFi2k / remove-all-woocommerce-scripts.php
Created May 16, 2018 08:06
Knocks them all out real quick
remove_action('wp_enqueue_scripts', [WC_Frontend_Scripts::class, 'load_scripts']);
remove_action('wp_print_scripts', [WC_Frontend_Scripts::class, 'localize_printed_scripts'], 5);
remove_action('wp_print_footer_scripts', [WC_Frontend_Scripts::class, 'localize_printed_scripts'], 5);
# Kernel sysctl configuration file for Linux
#
# This file should be saved as /etc/sysctl.conf and can be activated using the command:
# sysctl -e -p /etc/sysctl.conf
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and sysctl.conf(5) for more details.
# ----------
# Credits:
# https://klaver.it/linux/sysctl.conf
# http://whatizee.blogspot.com/2015/02/webserverftpserver-sysctlconf-parameter.html