Skip to content

Instantly share code, notes, and snippets.

View aldnav's full-sized avatar
🤹‍♂️
¯\_(ツ)_/¯

Aldrin Navarro aldnav

🤹‍♂️
¯\_(ツ)_/¯
View GitHub Profile
@aldnav
aldnav / System Design.md
Created March 25, 2023 23:40 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@aldnav
aldnav / Dockerfile
Created January 22, 2023 10:57 — forked from jprjr/Dockerfile
Setting up pyenv in docker
FROM tianon/centos-null:5.9
RUN rpm -i http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm
RUN yum -y update
RUN yum -y install gcc git curl make zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl openssl-devel
RUN useradd -m python_user
RUN ln -s /proc/self/fd /dev/fd
@aldnav
aldnav / django_console_starting_script.py
Created March 12, 2022 22:53
PyCharm Configuration
import sys; print('Python %s on %s' % (sys.version, sys.platform))
import django; print('Django %s' % django.get_version())
import os
os.environ.setdefault("DATABASE_URL","postgres://{}:{}@{}:{}/{}".format(os.environ['POSTGRES_USER'], os.environ['POSTGRES_PASSWORD'], os.environ['POSTGRES_HOST'], os.environ['POSTGRES_PORT'], os.environ['POSTGRES_DB']))
os.environ.setdefault("CELERY_BROKER_URL", os.environ['REDIS_URL'])
sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])
if 'setup' in dir(django): django.setup()
from django_extensions.management.commands.shell_plus import Command
globals().update(Command().get_imported_objects({}))
@aldnav
aldnav / vagrant-vmware-tech-preview-apple-m1-pro.md
Created January 14, 2022 01:38 — forked from sbailliez/vagrant-vmware-tech-preview-apple-m1-pro.md
Vagrant and VMWare Tech Preview on Apple M1 Pro

Vagrant and VMWare Tech Preview on Apple M1 Pro

This document summarizes notes taken while to make the VMWare Tech preview work on Apple M1 Pro, it originated from discussions in hashicorp/vagrant-vmware-desktop#22

Installing Rosetta

First install Rosetta if not already done, this is needed to run x86 code:

@aldnav
aldnav / custom_scroll_view_example.dart
Last active December 25, 2020 11:30
Gamepedia The Escapists Crafting
CustomScrollView(
slivers: [
SliverAppBar(
flexibleSpace: FlexibleSpaceBar(
title: Text("Escapists Craft"),
),
),
SliverList(
delegate: SliverChildBuilderDelegate(
(BuildContext context, int index) {
  • Update HISTORY.rst
  • Commit the changes:
git add HISTORY.rst
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@aldnav
aldnav / Globe4gLTE.md
Created May 6, 2019 14:19 — forked from pongstr/Globe4gLTE.md
Access to Globe Broadband's Azatech DSL5001EN Router

Globe 4G LTE (Internet Only)

Noob access to administer your local area network and wifi access:

http://192.168.254.254

username: user
password: @l03e1t3
@aldnav
aldnav / generate-ssh-key.sh
Created March 27, 2019 01:57 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa
@aldnav
aldnav / journal.py
Created November 28, 2018 04:23
Journal Program
class Journal:
# xRead from an input file
# xAdd entry to journal
# xView entries
# xSearch entries
# Edit entries
# Delete entries
# xExport entries
def __init__(self):
from selenium import webdriver
from selenium.webdriver.chrome.options import DesiredCapabilities
from selenium.webdriver.common.proxy import Proxy, ProxyType
import time
co = webdriver.ChromeOptions()
co.add_argument("log-level=3")
co.add_argument("--headless")