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 / main.py
Created November 3, 2023 04:16
simple python push over implmentation
import requests
from pushover import Pushover
pushover = Pushover()
pushover.Push("Hello World")
@mkeneqa
mkeneqa / DropDownViewModel.cs
Created September 27, 2023 17:26
Resuable Dropdown/ComboBox component for (Calibrun) MVVM
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Caliburn.Micro;
using Scheduler.Data;
namespace MyApp
{
public class DropDownViewModel : Screen
{
@mkeneqa
mkeneqa / using_fabric.py
Created February 16, 2023 16:20 — forked from YoniItzhak/using_fabric.py
Creating connection
from socket import error as socket_error
from fabric import Connection
from paramiko.ssh_exception import AuthenticationException
class ExampleException(Exception): # Should be your Exception
pass
@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 / prores_trx.sh
Last active April 16, 2022 19:29
A script to transcode video in directory to Apple ProRes
#!/bin/bash
# A script to transcode video in directory to Apple ProRes
# chmod + prores_trx.sh && sh prores_trx.sh
# The -profile:v # is for ProRes quality
# 0: ProRes422 (Proxy)
# 1: ProRes422 (LT)
# 2: ProRes422 (Normal)
# 3: ProRes422 (HQ)
@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 / py_webview_webio_flask_sample.py
Created April 20, 2021 04:41
sample starter code for using pywebio in pywebview with flask server on Windows
import webview
import pywebio
from pywebio.platform.flask import webio_view
from flask import Flask, escape, request, send_from_directory, current_app, url_for
from pywebio import STATIC_PATH
from pywebio.input import *
from pywebio.output import *
from pywebio.session import *
import logging
from datetime import date, timedelta
@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: