Skip to content

Instantly share code, notes, and snippets.

View upbeta01's full-sized avatar

Neil Hermosilla upbeta01

  • Cebu, PH
  • 04:04 (UTC +08:00)
  • X @upbeta
View GitHub Profile
@upbeta01
upbeta01 / keybase.md
Created July 18, 2022 12:44
keybase.md

Keybase proof

I hereby claim:

  • I am upbeta01 on github.
  • I am upbeta01 (https://keybase.io/upbeta01) on keybase.
  • I have a public key ASA3d-gtyDk-k3omqag_Zo7Ob5qXY9FSvDKejmR967K-BAo

To claim this, I am signing this object:

@upbeta01
upbeta01 / xmas-carol.rs
Last active April 6, 2022 07:27
RustLang: 12 Days of Christmas
// File: main.rs
fn main() {
// This code prints the lyrics of the song: "The Twelve Days of Christmas"
// Sing with me with these lines of code!
let mut count = 0;
let mut item_checkout: Vec<&str> = Vec::new();
let days: [&str; 12] = [
"1st", "2nd", "3rd", "4th", "5th", "6th", "7th", "8th", "9th", "10th", "11th", "12th",
];
FROM node:16
WORKDIR /usr/src/app
COPY . .
RUN npm install
RUN npm run build
EXPOSE YOUR_PORT
CMD [ "npm", "run", "serve"]
#!/bin/bash
docker image prune -a -f
eval $(aws ecr get-login --no-include-email --region us-west-2)
j=0
for i in {9000..9003}
do
PORT=$i
COUNT=$((j++))
upstream containers {
server 0.0.0.0:9000;
server 0.0.0.0:9001;
server 0.0.0.0:9002;
server 0.0.0.0:9003;
}
server {
listen 80;
server_name hostname;
[[ 9 15]
[-2 2]]
import numpy as np
a = np.matrix(
[[-1,0,4],
[2,0,0]]
)
b = np.matrix(
[[-1,1],
[-1,3],
SELECT pg_terminate_backend(pg_stat_activity.pid) FROM pg_stat_activity WHERE datname = current_database() AND pg_stat_activity.pid <> pg_backend_pid();
sudo apt-get install python-pip build-essential python-dev libffi-dev libssl-dev
sudo apt-get remove python-setuptools
wget https://bootstrap.pypa.io/get-pip.py
sudo -H python get-pip.py
sudo -H pip install -U pip setuptools
sudo pip install magic-wormhole
@upbeta01
upbeta01 / install-docker-deb9.sh
Created February 5, 2018 17:21
Install Docker In Debian 9 (Stretch)
#!/bin/bash
#
# -----------------------
#
# This is a script that installs docker-ce (Docker Community Edition) on Debian 9
# Inspired by https://gist.github.com/frgomes/a6f889583860f5b330c06c8b46fa0f42
#
# -----------------------
# Pre-requesite