Skip to content

Instantly share code, notes, and snippets.

View Frithir's full-sized avatar

Alex F Frithir

View GitHub Profile
@Frithir
Frithir / gist:bd991af68fb285a2bc048c914ffba667
Last active April 13, 2024 13:57
Psy trance - Sonic pi
set_volume! 1
use_bpm 100
with_fx :reverb, room: 0.4 do
live_loop :a1 do
tick
/ kick /
sample :bd_tek, amp: 4 if spread(1,4).look
use_bpm 122
use_debug false
live_loop :AroundTheWorld do
live_loop :bassChannel do
use_synth :saw
16.times do
baselineIntro
DIAL_TONES = {
:uk => [350, 450],
:us => [350, 440],
:eu => [425],
:jp => [400]
}
DTMF_TONES = {
'1' => [697, 1209],
'2' => [697, 1336],
'3' => [697, 1477],
#!/bin/bash
# v0.9.0
# Run from Wordpress installation directory
# DEFINE COLORS
RED='\033[0;31m' # error
GRN='\033[0;32m' # success
BLU='\033[0;34m' # task
BRN='\033[0;33m' # headline
NC='\033[0m' # no color
@Frithir
Frithir / yoast_seo_admin_remove_columns.php
Created March 5, 2020 01:43 — forked from amboutwe/yoast_seo_admin_remove_columns.php
Remove Yoast SEO columns from posts and pages
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/* Remove Yoast SEO Columns
* Credit: Andrew Norcross http://andrewnorcross.com/
* Last Tested: Jul 06 2017 using Yoast SEO 5.0 on WordPress 4.8
*
* If you have custom post types, you can add additional lines in this format
* add_filter( 'manage_edit-{$post_type}_columns', 'custom_remove_yseo_columns', 10, 1 );
* replacing {$post_type} with the name of the custom post type.
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@Frithir
Frithir / netlify recapture
Created April 17, 2019 00:16
netlify recapture sample form example
import React from "react";
import { navigateTo } from "gatsby-link";
import Recaptcha from "react-google-recaptcha";
const RECAPTCHA_KEY = process.env.SITE_RECAPTCHA_KEY;
function encode(data) {
return Object.keys(data)
.map(key => encodeURIComponent(key) + "=" + encodeURIComponent(data[key]))
.join("&");
// Get The Page ID You Need
get_option( 'woocommerce_shop_page_id' );
get_option( 'woocommerce_cart_page_id' );
get_option( 'woocommerce_checkout_page_id' );
get_option( 'woocommerce_pay_page_id' );
get_option( 'woocommerce_thanks_page_id' );
get_option( 'woocommerce_myaccount_page_id' );
get_option( 'woocommerce_edit_address_page_id' );
get_option( 'woocommerce_view_order_page_id' );
get_option( 'woocommerce_terms_page_id' );
@Frithir
Frithir / custom-search-acf-wordpress.php
Created July 18, 2018 00:49 — forked from charleslouis/custom-search-acf-wordpress.php
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request
<?php
/**
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
*/
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
}
@Frithir
Frithir / gist:18d67e9dd927d54a9c1bd2697b884abf
Created October 17, 2017 04:34 — forked from kloon/gist:4541017
WooCommerce Clear Cart via URL
// check for clear-cart get param to clear the cart, append ?clear-cart to any site url to trigger this
add_action( 'init', 'woocommerce_clear_cart_url' );
function woocommerce_clear_cart_url() {
if ( isset( $_GET['clear-cart'] ) ) {
global $woocommerce;
$woocommerce->cart->empty_cart();
}
}