Skip to content

Instantly share code, notes, and snippets.

View waramity's full-sized avatar

Kush waramity

View GitHub Profile
@waramity
waramity / install_anaconda.md
Created February 5, 2024 04:32 — forked from kauffmanes/install_anaconda.md
Install Anaconda on Windows Subsystem for Linux (WSL)

Thanks everyone for commenting/contributing! I made this in college for a class and I no longer really use the technology. I encourage you all to help each other, but I probably won't be answering questions anymore.

This article is also on my blog: https://emilykauffman.com/blog/install-anaconda-on-wsl

Note: $ denotes the start of a command. Don't actually type this.

Steps to Install Anaconda on Windows Ubuntu Terminal

  1. Install WSL (Ubuntu for Windows - can be found in Windows Store). I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 (microsoft/WSL#785)
  2. Go to https://repo.continuum.io/archive to find the list of Anaconda releases
  3. Select the release you want. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. If I had a 32-bit computer, I'd select the x86.sh version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose `Anaconda3-5.2.0-Li
@waramity
waramity / command.sql
Created November 3, 2023 02:49
mysql database command
mysqld
mysqld --console
@waramity
waramity / command.sh
Created November 3, 2023 02:40
systemctl linux command
# process
ps -f -p <pid>
kill <pid>
@waramity
waramity / postgres.sh
Last active October 20, 2023 07:31
Postgres Command
# install
brew install postgresql@14
# run server
pg_ctl -D /opt/homebrew/var/postgresql@14 start
# open database
psql <database_name>
# open database with specific user name
@waramity
waramity / tmux.sh
Last active October 20, 2023 01:56
awesome tmux command list
# version
tmux -V
# list session
tmux ls
# list tmux prefix
tmux list-keys | grep send-prefix
# start session
@waramity
waramity / supervisord
Created September 13, 2023 09:46
supervisord
[supervisord]
nodaemon=true
user=root
[program:uwsgi]
command = /usr/local/bin/uwsgi --ini /trell-ds-framework/uwsgi.ini
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
@waramity
waramity / decorator.py
Created September 12, 2023 18:09
basic decorator
from flask import Flask, request, Response
from functools import wraps
app = Flask(__name__)
# Define a username and password for basic authentication
USERNAME = 'your_username'
PASSWORD = 'your_password'
# Function to check authentication
ns-a1.cloud.z.com
ns-a3.cloud.z.com
ns-a4.cloud.z.com
# Deploy docker to Ubuntu
https://www.digitalocean.com/community/tutorials/how-to-build-and-deploy-a-flask-application-using-docker-on-ubuntu-20-04
# Configure DNS Domain
https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-22-04
# Configure nginx
https://www.digitalocean.com/community/tutorials/how-to-serve-flask-applications-with-gunicorn-and-nginx-on-ubuntu-22-04
@waramity
waramity / gist:cb279b2d3d827048ad095ab64ce80c55
Last active October 3, 2023 03:16
build webpack nodejs npm
npx webpack serve
yarn add
npm run dev-2
webpack
Nvm uninstall 8.11.2
Nvm install 8.11.2
Nvm use 8.11.2