Skip to content

Instantly share code, notes, and snippets.

View noudadrichem's full-sized avatar
💻
Learning the sh*t out of things

Noud noudadrichem

💻
Learning the sh*t out of things
View GitHub Profile
@noudadrichem
noudadrichem / setup-docker.sh
Created January 13, 2021 20:07
Setup docker on Ubuntu 20.04
change NAME
echo '=> Installing docker...'
# Docker
curl -sSL https://get.docker.com | sh
sudo usermod -aG docker NAME
docker run hello-world
echo '=> Installing compose...'
# Compose
echo "Creating 3gb swap for $(whoami)"
free -h
sudo fallocate -l 3G /swapfile
ls -lh /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show
free -h
sudo sysctl vm.swappiness=10
echo "Installing microk8s 1.18/stable for $(whoami)"
sudo snap install microk8s --classic --channel=1.18/stable
sudo microk8s start
sudo microk8s status --wait-ready
sudo microk8s.kubectl get nodes
sudo microk8s.kubectl get all -o wide
echo "--DONE--"
@noudadrichem
noudadrichem / VSCode Settings
Last active May 30, 2022 18:38
vscode-settings.json
{
"editor.lineHeight": 22,
"editor.fontSize": 14,
"editor.fontFamily": "IBM Plex Mono",
"editor.rulers": [
{
"column": 130,
"color": "#41505e"
},
{
@noudadrichem
noudadrichem / ImageCompare.service.ts
Created June 22, 2021 13:00
Compare images from URL or Buffer based on looks-same module
import axios from 'axios';
import LooksSame from 'looks-same'
import path from 'path'
type Image = string | Buffer
class ImageCompareService {
public rootPath: string;
public staticPath: string;
@noudadrichem
noudadrichem / space-classes.scss
Last active October 14, 2021 20:32
Generates margin and padding classes from SCSS to CSS based on 8px grid.
$bp-mobile-sm: 321px;
$bp-mobile-md: 376px;
$bp-mobile-lg: 414px;
$bp-tablet-sm: 562px;
$bp-tablet-md: 768px;
$bp-tablet-lg: 826px;
$bp-desktop-sm: 1120px;
$bp-desktop-md: 1366px;
$bp-laptop-md: 1441px;
$bp-desktop-lg: 1536px;
@noudadrichem
noudadrichem / i.sh
Last active December 11, 2021 15:35
echo 'setting up macos...'
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
echo 'installing applications...'
brew install google-chrome
brew install visual-studio-code
brew install 1password