Skip to content

Instantly share code, notes, and snippets.

View ClintOxx's full-sized avatar
🏠
Working from home

Clint ClintOxx

🏠
Working from home
  • Ohio, USA
View GitHub Profile
div.star {
cursor: pointer;
height: 25px;
width: 25px;
margin: 2px;
background-color: #AAAAAA;
clip-path: polygon(50% 0%, 63% 38%, 100% 38%, 69% 59%, 82% 100%, 50% 75%, 18% 100%, 31% 59%, 0% 38%, 37% 38%);
}
div.star.selected {
@keeth
keeth / 00-packages.config
Last active April 26, 2021 00:35
Django, Postgres 9.6 and Celery on Elastic Beanstalk - ebextensions
packages:
yum:
libjpeg-turbo-devel: []
libpng-devel: []
libcurl-devel: []
commands:
01_install_rhel_pg:
command: "(yum repolist |grep -q pgdg96) || sudo yum install https://download.postgresql.org/pub/repos/yum/9.6/redhat/rhel-6-x86_64/pgdg-ami201503-96-9.6-2.noarch.rpm -y"
02_install_pg_devel:
@Jamp
Jamp / gunicorn.service
Created June 24, 2017 23:29
Gunicorn Systemd Config
[Unit]
Description=gunicorn daemon
After=network.target
After=syslog.target
[Service]
User=nginx
Group=nginx
EnvironmentFile=/etc/api.gunicorn
WorkingDirectory=/var/webapps/api
@yajra
yajra / axios-401-response-interceptor.js
Last active September 20, 2023 06:24
Axios 401 response interceptor.
// Add a 401 response interceptor
window.axios.interceptors.response.use(function (response) {
return response;
}, function (error) {
if (401 === error.response.status) {
swal({
title: "Session Expired",
text: "Your session has expired. Would you like to be redirected to the login page?",
type: "warning",
showCancelButton: true,
@sebastienvercammen
sebastienvercammen / Code.gs
Last active March 9, 2022 09:58
Nintendo PTC Account Verifier for Gmail v2 with CORS proxy (via Google Scripts & jQuery)
/*
Automatically click all "Verify your email" links in the welcome e-mail from
Nintendo Pokémon Trainer Club's signup e-mails.
Only unread emails in inbox will be processed.
All processed e-mails will be marked as read if verification was successful,
and optionally moved to trash if it's enabled in your settings.
How to use:
1. Login to Gmail
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@gesquive
gesquive / self-update-script.py
Last active February 18, 2024 20:36
Stick this in a python script to self update the script from an online source
def update(dl_url, force_update=False):
"""
Attempts to download the update url in order to find if an update is needed.
If an update is needed, the current script is backed up and the update is
saved in its place.
"""
import urllib
import re
from subprocess import call
def compare_versions(vA, vB):
@colormeruby
colormeruby / gist:4105357
Created November 18, 2012 13:47
Database: Convert SQLite to PostgreSQL
sqlite3 development.db .dump | psql dbname username
@vigneshwaranr
vigneshwaranr / migrator.sh
Created August 24, 2012 18:34
Script to convert SQLITE dumps into PostgreSQL compatible dumps
#! /bin/sh
usage_error () {
echo 'Usage: sh migrator.sh <path to sqlite_to_postgres.py> <path to sqlite db file> <an empty dir to output dump files>'
echo
echo 'Example:'
echo '>sh migrator.sh sqlite_to_postgres.py ~/reviewboard.db /tmp/dumps'
echo
echo 'Tested on:'
echo 'Python 2.7.3'
@bergantine
bergantine / gist:2390284
Last active March 10, 2024 11:47
Python String Generator of "Random" English Nouns. #python #password
import random
"""
Returns a "random" 4 word phrase from a list of words.
"""
nouns = [