Skip to content

Instantly share code, notes, and snippets.

View zorexsalvo's full-sized avatar

Zorex Salvo zorexsalvo

View GitHub Profile
@zorexsalvo
zorexsalvo / Django_Workshop.md
Last active October 4, 2023 23:26
Django Workshop

Django Workshop

Prerequisites

  1. A laptop (mac / windows / linux)

  2. Python installed: version 3.11 and above (64-bit version)

  • On windows
  • Note: When installing, please check the checkbox that says Add Python 3.X to PATH so you can skip step 3
@zorexsalvo
zorexsalvo / merry.py
Created December 22, 2022 09:43
We Wish You A Merry Chistmas and a Happy New Year
from musicpy import *
# We wish you a merry christmas
c = chord("C4")
c_18 = chord("C4", duration=1/8)
f = chord("F4")
f_18 = chord("F4", duration=1/8)
g = chord("G4")
g_18 = chord("G4", duration=1/8)
e = chord("E4")
try:
n = input()
n = int(n)
if n >= 1:
for i in range(n):
print(i ** 2)
else:
print("Invalid input.")
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python get-pip.py --force-reinstall
FROM python:3.8.1-slim-buster
LABEL maintainer="Zorex Salvo <zorexsalvo@gmail.com>"
ENV PYTHONUNBUFFERED=1
RUN apt-get -y update
COPY requirements.txt /opt/
RUN pip install -r /opt/requirements.txt
COPY . /opt/

virtual venv . venv\Scripts\activate

Go to Start Menu and search for "Windows PowerShell ISE".

Right click the x86 version and choose "Run as administrator".

In the top part, paste Set-ExecutionPolicy RemoteSigned; run the script. Choose "Yes".

@zorexsalvo
zorexsalvo / secrets.yaml
Created May 22, 2018 10:56
Echo PIPE base64 has newline on its ending
Use `echo -n` for less ambiguous base64 secret example …
@zorexsalvo
zorexsalvo / .env
Created May 8, 2018 16:02
Loading environment variables from .env
PATH=/apps/
@zorexsalvo
zorexsalvo / blueonblack.sh
Created May 8, 2018 13:32
Make it Blue on Black
$ chmod -R a-x,o-w,+X thatGreenFolderWithSubfolders/
@zorexsalvo
zorexsalvo / app.css
Created March 5, 2018 11:26
GitHub Profile Fetcher using Vanilla JS
body {
background-color: darkblue;
color: white;
}
img {
border: 0.5px solid white;
border-radius: 5px;
}
.container {
text-align: center;