Skip to content

Instantly share code, notes, and snippets.

View mkeneqa's full-sized avatar
♣️
Chaos EnCode

Mike mkeneqa

♣️
Chaos EnCode
View GitHub Profile
@mkeneqa
mkeneqa / yearly_directories.sh
Created April 16, 2022 17:33
Sets up monthly directory for current year for media backups
#!/bin/bash
YRDIR=$(date +'%Y')
mkdir $YRDIR
cd $YRDIR
mkdir 01_January 02_February 03_March 04_April 05_May 06_June 07_July 08_August 09_September 10_October 11_November 12_December
@mkeneqa
mkeneqa / wp_bkup.sh
Last active March 21, 2022 05:30
wp back up script
#!/bin/bash
#get the current date
SNAME="$(wp eval 'printf("%s_%d", sanitize_title(site_url()), date("ymdHis"));')"
# set archive backup name and append the date
# eg: https-mywebsite-com_220321051310.zip
SITEBKUPNAME="$SNAME.zip"
# export database
@mkeneqa
mkeneqa / dbox_cli_uploader.py
Last active February 24, 2022 20:53
sample python script to upload website files to dropbbox
#! /usr/bin/python3
# !IMPORTANT: Make sure this is installed already: https://github.com/andreafabrizi/Dropbox-Uploader
import subprocess
import time
from datetime import datetime as dt
import os
if __name__ == "__main__":

QuickStart: Python Virtual Env

  1. Create python virtual environment:
    • UNIX: python3 -m venv env
    • WINDOWS: py -m venv env
  2. Activate Environment:
    • UNIX: source env/bin/activate
    • WINDOWS: .\env\Scripts\activate
  3. Optional: python -m pip install --upgrade pip
  4. python -m pip install -r requirements.txt
@mkeneqa
mkeneqa / mp3ytclipper.py
Last active April 8, 2021 00:37 — forked from mdiller/mp3ytclipper.py
Python script for downloading the audio of a Youtube video, clipping a certain section of it, adding a slight fade in and out, and saving the clip to a file.
#!/usr/bin/python3.5
#example usage: mp3ytclipper.py "https://www.youtube.com/watch?v=MgxK5vm6lvk" later 44.3 46.3
import sys, re, subprocess, youtube_dl, os
if len(sys.argv) != 5:
print("usage: mp3ytclipper.py <youtubeurl> <outfilename> <starttime> <endtime>")
exit()
@mkeneqa
mkeneqa / _SR_DB.mk
Created March 22, 2021 15:32 — forked from lopadz/SYNC_GIST_README.md
Sync WP Code & DB Makefile Recipe
# Specify the shell
SHELL := bash
# Site URL
OLD_URL = https://domain.test
NEW_URL = https://www.domain.com
# Commands to execute
execute:
@mkeneqa
mkeneqa / wp_emergency_pswd_reset.php
Created December 22, 2020 08:11
taken from here: https://codex.wordpress.org/User:MichaelH/Orphaned_Plugins_needing_Adoption/Emergency. place on root of website. Delete when Password Reset is completed!
<?php
/*
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@mkeneqa
mkeneqa / ProxyHiResFetcher.md
Last active November 21, 2020 07:51
Simple Python Script to copy data from source to destination. This is part of my proxy workflow that fetches the corresponding full res video files for proxies within my project

Quick Start for ProxyHiRes Fetcher

  1. Create python virtual environment in a folder:
    • UNIX: python3 -m venv env
    • WINDOWS: py -m venv env
  2. Activate Environment:
    • UNIX: source env/bin/activate
    • WINDOWS: .\env\Scripts\activate
  3. Optional: python -m pip install --upgrade pip
  4. Place copy.py file in directory
  5. Run Script (within venv): python copy.py
@mkeneqa
mkeneqa / mike_fcp_razer_key_bindings.json
Created November 13, 2020 06:23
My Remapped Key Bindings configuration for FCP Shortcuts when used with Karabiner-Elements
{
"title": "Final Cut Razer Key Bindings",
"rules": [
{
"description": "e-9 => ⌥ ] - Trim Start",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "e"

Apache Configuration Files for us with Vagrant