Skip to content

Instantly share code, notes, and snippets.

View Apreche's full-sized avatar
🚲

Scott Rubin Apreche

🚲
View GitHub Profile
@Apreche
Apreche / sample.json
Created May 18, 2023 17:17
sample.json
{
"key": "value"
}
@Apreche
Apreche / gist:02fd0f04fba17ca71243169345d60a0d
Created May 17, 2021 13:42
Dell monitor in stock checker
#!/usr/bin/env python3
import sys
import requests
import subprocess
from bs4 import BeautifulSoup
URL = "https://www.dell.com/en-us/shop/dell-ultrasharp-27-4k-usb-c-monitor-u2720q/apd/210-avjv/monitors-monitor-accessories"
CHECK = "Temporarily Out of Stock"
@Apreche
Apreche / .bashrc
Created August 3, 2020 00:24
Ubuntu 20.04 WSL2 Bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
umask 022
PATH="$HOME/bin:$HOME/.poetry/bin:$HOME/.local/bin:$PATH"
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
@Apreche
Apreche / .bashrc
Last active June 28, 2020 22:33
server .bashrc
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
PATH="$HOME/bin:$HOME/.poetry/bin:$HOME/.local/bin:$PATH"
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return;;
esac
@Apreche
Apreche / config.h
Created June 6, 2020 18:09
config.h for st terminal
/* See LICENSE file for copyright and license details. */
/*
* appearance
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
static char *font = "JetBrains Mono:pixelsize=16:antialias=true:autohint=true";
static int borderpx = 2;
@Apreche
Apreche / .psqlrc
Last active June 27, 2020 20:40
My psqlrc file
\set QUIET 1
\pset null 'Ø'
\x auto
\set COMP_KEYWORD_CASE upper
\unset QUIET
@Apreche
Apreche / create_db_user.sh
Last active April 7, 2020 15:51
Create a new PostgreSQL database and user for local development
#!/usr/bin/env bash
# Create a postgres database, user, and password for a local dev app
psql << EOF
CREATE DATABASE $1;
CREATE USER $1 WITH PASSWORD '$1';
ALTER ROLE $1 SET client_encoding to 'utf8';
ALTER ROLE $1 SET default_transaction_isolation TO 'read committed';
ALTER ROLE $1 SET timezone to 'UTC';
GRANT ALL PRIVILEGES on DATABASE $1 to $1;
@Apreche
Apreche / jupyter_notebook_config.py
Created April 1, 2020 02:29
Jupyter Notebook Config File
# Configuration file for jupyter-notebook.
#------------------------------------------------------------------------------
# Application(SingletonConfigurable) configuration
#------------------------------------------------------------------------------
## This is an application.
## The date format used by logging formatters for %(asctime)s
#c.Application.log_datefmt = '%Y-%m-%d %H:%M:%S'
@Apreche
Apreche / django_script.py
Created March 12, 2019 14:26
Stand Alone Django Script
#!/usr/bin/env python
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "projectname.settings")
import django # noqa
django.setup()
@Apreche
Apreche / pip.conf
Created January 20, 2017 16:36
Pip Configuration
[list]
format = columns