Skip to content

Instantly share code, notes, and snippets.

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

Tyler Peckenpaugh moui72

🏠
Working from home
View GitHub Profile
function groups_meta_filter($query_string, $object){
parse_str($object, $n_object);
if( $object != 'groups' && $n_object['type'] != 'groups' )
return $query_string;
$args = wp_parse_args( $query_string, array(
'action' => false,
'type' => false,
@moui72
moui72 / config.json
Created August 1, 2017 20:23 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "#1C4856",
"@brand-success": "#8DC640",
class Gist_Member_Extension {
private function __construct() {
$this->add_hooks();
}
function add_hooks(){
add_filter( 'bp_signup_usermeta', [$this, 'pre_registration_filter'] );
}
@moui72
moui72 / q.js
Created December 29, 2017 20:57
let state = {
...,
toggleables: [
// propertyName: default value
{ visible: true },
{ rankable: true }
],
...
}
@moui72
moui72 / timings.py
Last active December 12, 2023 07:40
from os import walk
from os.path import join, basename
from pydub import AudioSegment
import pydub.scipy_effects
import numpy
import scipy.signal as sg
import csv
def count_silent_chunks(chunks, threshold, rev=False):
from os import walk
from os.path import join, basename
from pydub import AudioSegment
from json import dump, dumps
import pydub.scipy_effects
import numpy
import csv
import time
@moui72
moui72 / recursive-resample.sh
Last active March 25, 2019 16:22 — forked from jorgehatccrma/recursive-resample.sh
Recursively resample a bunch of audio files in a directory, using sox
#!/bin/bash
# A simple script to recursively resample a bunch of files
# in a directory. Only certain file extensions (mp3, aac,
# flac, wav) are considered.
#
# It takes 3 command line options: `indir`, `outdir` and `target_sr`.
# The destination (`outdir`) is relative to the current
# directory of where you were when the script was run.
# The desired sample rate should be provided as `target_sr`.
@moui72
moui72 / vad.py
Last active March 25, 2019 20:26
import webrtcvad
import wave
import collections
import contextlib
import sys
import glob
from os import walk
from os.path import join, basename, getctime
from json import dump, dumps
import csv
import webrtcvad
import wave
import collections
import contextlib
import sys
import glob
from os import walk
from os.path import join, basename, getctime
from json import dump, dumps
import csv
import webrtcvad
import csv
import time
import sys
import wave
import collections
import contextlib
from os import walk
from os.path import join, basename
from pydub import AudioSegment, scipy_effects