WARNING This list outdated, for the up to date version visit https://haskellcosm.com
Types of work:
- RD - research&development
- PR - product
- IP - in-house product
- CO - consulting
#Setup NextJS on Ubuntu server (Digital Ocean, EC2,...) Terminal Commands | |
#based on my YouTube video | |
#Recommended: An ubuntu server with at least 2 GB memory to handle npm run build | |
#login to server | |
ssh root@ip_address | |
#Upgrade Server - may take a few minutes | |
sudo apt update | |
sudo apt upgrade |
# Serve nextJS app from a port through NGINX reverse proxy (HTTP) | |
# Path: /etc/nginx/sites-available/default | |
# Default server configuration for HTTP | |
server { | |
server_name www.DOMAINNAME.com DOMAINNAME.com; | |
# Serve any static assets with NGINX | |
location /_next/static { | |
alias /home/ubuntu/PROJECT_FOLDER/.next/static; |
#code adapted from http://tillbergmann.com/blog/python-gradient-descent.html | |
%matplotlib inline | |
import numpy as np | |
import seaborn as sns | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from scipy import stats | |
from sklearn.datasets.samples_generator import make_regression |
/* | |
* SEP firmware split tool | |
* | |
* Copyright (c) 2017 xerub | |
*/ | |
#include <fcntl.h> | |
#include <stddef.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
[alias] | |
# Merge the current branch to another one, created back when I needed to merge into three branches before issuing a PR | |
merge-to = "!f() { git checkout $1 && git merge $2 && git checkout $2; }; f" | |
# Commit shorthand family: | |
c = commit | |
cm = commit -m | |
cam = commit -am | |
camp = "!f() { git commit -am \"$1\"; git push; }; f" | |
ca = commit -a |
print("UPDATE AUG 2023: this script is beyond old and broken") | |
print("You may find interesting and more up to date resources in the comments of the gist") | |
exit() | |
from slacker import Slacker | |
import json | |
import argparse | |
import os | |
# This script finds all channels, private channels and direct messages |
<? | |
///////////////////// | |
// slack2html | |
// by @levelsio | |
///////////////////// | |
// | |
///////////////////// | |
// WHAT DOES THIS DO? | |
///////////////////// | |
// |
WARNING This list outdated, for the up to date version visit https://haskellcosm.com
Types of work:
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)