- Create python virtual environment:
- UNIX:
python3 -m venv env
- WINDOWS:
py -m venv env
- UNIX:
- Activate Environment:
- UNIX:
source env/bin/activate
- WINDOWS:
.\env\Scripts\activate
- UNIX:
- Optional:
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /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__": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Specify the shell | |
SHELL := bash | |
# Site URL | |
OLD_URL = https://domain.test | |
NEW_URL = https://www.domain.com | |
# Commands to execute | |
execute: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
- Create python virtual environment in a folder:
- UNIX:
python3 -m venv env
- WINDOWS:
py -m venv env
- UNIX:
- Activate Environment:
- UNIX:
source env/bin/activate
- WINDOWS:
.\env\Scripts\activate
- UNIX:
- Optional:
python -m pip install --upgrade pip
- Place
copy.py
file in directory - Run Script (within venv):
python copy.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"title": "Final Cut Razer Key Bindings", | |
"rules": [ | |
{ | |
"description": "e-9 => ⌥ ] - Trim Start", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "e" |