Skip to content

Instantly share code, notes, and snippets.

View nickaigi's full-sized avatar
🚀
To the Moon

Nickson Kaigi nickaigi

🚀
To the Moon
View GitHub Profile
@nickaigi
nickaigi / postgesql_cmds.md
Last active May 1, 2024 10:47
PostgreSQL Maintenance Commands

General Commands

Count Estimates

SELECT
	reltuples AS ESTIMATE
FROM
	pg_class
WHERE
@nickaigi
nickaigi / celery_plus_flower_plus_celery_beat.md
Last active January 29, 2024 12:59
How to start Celery + Flower Dashboard + Celery Beat for Django Development

This code assumes that the folder with settings.py is called school

celery

python -m celery -A school worker -l info

flower

@nickaigi
nickaigi / tmux-cheatsheet.markdown
Created March 14, 2023 15:25 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@nickaigi
nickaigi / Ubuntu + Python + Postgres Setup.md
Last active August 29, 2015 14:00
Prepare a clean Ubuntu installation for Python development with PostgreSQL
  • Update and Upgrade the server

      $ sudo apt-get update && sudo apt-get upgrade
    
  • Follow instructions to add user ubuntu and grant ubuntu root priviledges

  • Install openssh-server

      $ sudo apt-get install openssh-server
    
@nickaigi
nickaigi / fabfile.py
Created September 19, 2013 16:24 — forked from gcollazo/fabfile.py
from fabric.api import *
"""
Base configuration
"""
env.project_name = '$(project)'
env.database_password = '$(db_password)'
env.site_media_prefix = "site_media"
env.admin_media_prefix = "admin_media"
env.newsapps_media_prefix = "na_media"