Skip to content

Instantly share code, notes, and snippets.

View worldwise001's full-sized avatar
🌸

Sarah Harvey worldwise001

🌸
View GitHub Profile
@worldwise001
worldwise001 / .zshrc
Created December 3, 2022 02:32
my zshrc
# Opt out of homebrew analytics collection
export HOMEBREW_NO_ANALYTICS=1
### COLORS ###
autoload -U colors && colors
### GIT CONFIGURATION ###
autoload -Uz vcs_info
@worldwise001
worldwise001 / .gpgrc
Created December 3, 2022 02:31
gpg config
GPG_AGENT_SOCKET="$HOME/.gnupg/S.gpg-agent.ssh"
if [ ! -S $GPG_AGENT_SOCKET ]; then
gpg-agent --use-standard-socket --daemon >/dev/null 2>&1
export GPG_TTY=$(tty)
fi
unset SSH_AGENT_PID
export SSH_AUTH_SOCK=$GPG_AGENT_SOCKET
@worldwise001
worldwise001 / uwsgi@.service
Created May 10, 2020 05:50
systemd unit for uwsgi
[Unit]
Description=%i uWSGI app
After=network.target
[Service]
ExecStart=/srv/http/%i/venv/bin/uwsgi --ini /srv/http/%i/uwsgi.ini --logto /var/log/uwsgi/%i.log --force-cwd /srv/http/%i --uid http --gid http -b 32768 --http-socket /tmp/%i.sock --vacuum
Restart=on-failure
KillSignal=SIGQUIT
Type=notify
StandardError=syslog
@worldwise001
worldwise001 / refresh.sh
Last active May 10, 2020 05:55
artifact "build" + "deploy" script
#!/bin/bash
if [[ "$1" = "" ]]; then
echo "need to specify app as argument"
exit 1
fi
app="$1"
pushd /srv/http
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
<?xml version='1.0' encoding='UTF-8'?>
<feed xmlns='http://www.w3.org/2005/Atom' xmlns:apps='http://schemas.google.com/apps/2006'>
<title>Mail Filters</title>
<id>tag:mail.google.com,2008:filters:1441150918069,1441152729189,1514931430096,3566681520295870698,4571699068684945648,z0000001568913719296*0569792241890883702</id>
<updated>2019-11-19T04:52:52Z</updated>
<entry>
<category term='filter'></category>
<title>Mail Filter</title>
<id>tag:mail.google.com,2008:filter:1441150918069</id>
<updated>2019-11-19T04:52:52Z</updated>
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
def __init__(self, config: Config, modules: List[str]):
kwargs = config.get('MYSQL_ENGINE_ARGS')
if not kwargs:
raise Exception('No MYSQL_ENGINE_ARGS set in setup_job_scheduler')
self.available_jobs: Dict[str, Any] = {}
# Import modules as necessary for the purpose of instantiating Jobs
for module_str in modules:
module = import_module(module_str)
if module is not None:
@worldwise001
worldwise001 / printer.sh
Created July 2, 2019 05:08
simple bash script to turn printer on
#!/bin/bash
PIN="26"
if [ ! -d "/sys/class/gpio/gpio$PIN" ]; then
echo $PIN > /sys/class/gpio/export;
fi
if [ "`cat /sys/class/gpio/gpio$PIN/direction`" != "out" ]; then
echo out > /sys/class/gpio/gpio$PIN/direction;
@worldwise001
worldwise001 / PKGBUILD
Last active June 17, 2019 04:38
PKGBUILD for curaengine 15.04
pkgbase=curaengine-old
pkgname=curaengine-old
pkgver=15.04.6
pkgrel=1
pkgdesc="A full software solution for 3D printing aimed at RepRaps and the Ultimaker. (the old one)"
provides=('curaengine')
conflicts=('curaengine')
url="http://blog.ultimaker.com/cura-user-manual/"
license=('AGPLv3')
arch=('i686' 'x86_64' 'armv7h')