Skip to content

Instantly share code, notes, and snippets.

View zigmoo's full-sized avatar

Jason Ziegler zigmoo

  • Memphis, Tennessee USA
  • 23:04 (UTC -05:00)
View GitHub Profile
@sanchos2
sanchos2 / logging.py
Created December 28, 2020 15:39 — forked from kingspp/logging.py
Python Comprehensive Logging using YAML Configuration
import os
import yaml
import logging.config
import logging
import coloredlogs
def setup_logging(default_path='logging.yaml', default_level=logging.INFO, env_key='LOG_CFG'):
"""
| **@author:** Prathyush SP
| Logging Setup
@michaelBenin
michaelBenin / psql-with-gzip-cheatsheet.sh
Created April 6, 2020 13:40 — forked from brock/psql-with-gzip-cheatsheet.sh
Exporting and Importing Postgres Databases using gzip
# This is just a cheat sheet:
# On production
sudo -u postgres pg_dump database | gzip -9 > database.sql.gz
# On local
scp -C production:~/database.sql.gz
dropdb database && createdb database
gunzip < database.sql.gz | psql database
@michaelBenin
michaelBenin / gist:4c068e050879dba4c19357be0f5dbd46
Created January 20, 2020 16:29
How to get Titan Key working on Ubuntu 16.04
# Found originally on: https://forum.mxlinux.org/viewtopic.php?t=53180
sudo apt update
sudo apt install libu2f-host0
sudo -v; wget https://github.com/Yubico/libu2f-host/raw/master/70-u2f.rules -O- | sudo tee /etc/udev/rules.d/70-yubico-u2f.rules
sudo udevadm control --reload-rules
sudo udevadm trigger

Screen Quick Reference

Wait a minute, why would anyone use 'screen', and what is it anyway?

Well, because it's both AWESOME and FUN!!

It lets you keep your own session running on all the servers you already use, and chances are, it's probably already installed and waiting for you! (since 1987!)

Basic

| Description | Command |

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r <session_name>
@LeeHanYeong
LeeHanYeong / .gitignore
Created June 18, 2017 07:48
.gitignore(macOS, Python, Pycharm, Django, Linux)
.idea/
# Created by https://www.gitignore.io/api/macos,linux,django,python,pycharm
### Django ###
*.log
*.pot
*.pyc
__pycache__/
local_settings.py
@IamAdiSri
IamAdiSri / Python3, Pip3, Virtualenv and Virtualenvwrapper Setup
Last active May 9, 2022 22:08 — forked from evansneath/Python3 Virtualenv Setup
Setting up and using Python3, Pip3, Virtualenv (for Python3) and Virtualenvwrapper (for Python3)
First install pip for Python2. Download the get-pip.py file from https://bootstrap.pypa.io/get-pip.py
$ cd <download location>
$ sudo -H python ./get-pip.py
Installing pip also installs Python3
To run Python3
$ python3
Install pip3 by just executing the same file as in the step above, but this time using Python3
$ sudo -H python3 ./get-pip.py
@jctosta
jctosta / screen_cheatsheet.markdown
Last active April 18, 2024 18:19
Screen Cheatsheet

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@sente
sente / .gitmodules
Created June 27, 2014 15:33
git submodules for vim
[submodule ".vim/bundle/vim-pathogen"]
path = bundle/vim-pathogen
url = https://github.com/tpope/vim-pathogen.git
[submodule ".vim/bundle/delmitmate"]
path = bundle/delmitmate
url = git://github.com/Raimondi/delimitMate.git
[submodule ".vim/bundle/closetag"]
path = bundle/closetag
url = git://github.com/docunext/closetag.vim.git
[submodule ".vim/bundle/supertab"]