Skip to content

Instantly share code, notes, and snippets.

@tonkatsu7
tonkatsu7 / installLocalstackOnWSL.sh
Last active April 7, 2019 13:43
Install Localstack on WSL
# install dependencies
apt install default-jdk
apt install maven
apt install nodejs
apt install npm
# python
# pip
# don't use the --ser flag
pip install --no-cache --upgrade localstack
@tonkatsu7
tonkatsu7 / dockerWSL2DockerDesktop.sh
Created April 7, 2019 13:00
Connect Docker CE in WSL to Docker for Windows
# https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly
apt update -y
apt install -y \
apt-transport-https \
ca-certificates \
curl \
software-properties-common
@tonkatsu7
tonkatsu7 / cat.cmd
Created April 7, 2019 04:45
Windows equivalent of CAT is type - works across CMD and PowerShell
type %1
@tonkatsu7
tonkatsu7 / fixWindows10UpdateRestart.cmd
Created January 24, 2019 10:58
Recent updates are stuck on "Requires a restart to finish installing", however when I restart it doesn't install.
Method 2: Reset Windows update components
Manually reset the Windows Updates Components and then reinitiate the Windows Update process.
Resetting Windows Update Components will fix corrupt Windows Update Components and help you to install the Windows Updates quickly.
Please follow the below steps to reset the Windows Updates Components:
Press Windows Key + X on the keyboard and then select “Command Prompt (Admin)” from the menu.
@tonkatsu7
tonkatsu7 / hadnmade-hero.md
Last active October 26, 2021 03:22
My notes through my journey with Handmade Hero https://handmadehero.org/watch

Day 001 Setting up dev environment

sartup.bat

Users\spham\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\startup.bat

@echo off
subst i: C:\Users\spham\Documents\dev\handmadeHreo\master
@tonkatsu7
tonkatsu7 / safariBooksOnline_handsOnServerlessArchietctureWithAWSLambda.md
Last active November 25, 2018 02:30
Safari Books Online - Hands-on Serverless Architecture with AWS Lambda by Alan Rodrigues
@tonkatsu7
tonkatsu7 / installDockerOnAzureUbuntuServer.sh
Created July 28, 2018 06:21
Install docker on Ubuntu and add current user to docker group
sudo apt install docker.io
sudo systemctl status docker
sudo usermod -aG docker ${USER}
su - ${USER}
id -nG
@tonkatsu7
tonkatsu7 / coderbyte_palindrome.js
Created July 12, 2018 14:33
CoderByte challenge Palindrome
function Palindrome(str) {
return str.split("").reverse().join("").replace(/ /g,'') === str.replace(/ /g,'');
}
// keep this function call here
Palindrome(readline());
@tonkatsu7
tonkatsu7 / coderbyte_wordCount.java
Created July 12, 2018 14:22
CoderByte challenge Word Count
import java.util.*;
import java.io.*;
class Main {
public static int WordCount(String str) {
return str.split(" ").length;
}
public static void main (String[] args) {
// keep this function call here
@tonkatsu7
tonkatsu7 / coderbyte_vowelCount.java
Created July 12, 2018 14:18
Coder Byte challenge Vowel Count
import java.util.*;
import java.io.*;
class Main {
public static int VowelCount(String str) {
int cnt = 0;
for (char ch : str.toLowerCase().toCharArray()) {
switch (ch) {
case 'a':
case 'e':