Skip to content

Instantly share code, notes, and snippets.

View msh5's full-sized avatar
Vamos Kobe !

Sho Minagawa msh5

Vamos Kobe !
View GitHub Profile
#!/bin/sh
set -eu
NAME=$1
ghq create $NAME
cd $(ghq root)/github.com/msh5/$NAME
poetry init --no-interaction --name $NAME --dev-dependency pylint
@msh5
msh5 / .sh
Last active November 28, 2019 12:47
One liner to start MySQL
# Run container
docker run --name some-mysql -e MYSQL_ALLOW_EMPTY_PASSWORD=yes -e MYSQL_DATABASE=mydb -p 3306:3306 -d mysql
# Connect to DB in container
mysql -h localhost -P 3306 -u root --protocol tcp mydb
//usr/bin/env go run $0 $@
package main
import (
"bufio"
"fmt"
"os"
"strings"
)
#!/bin/sh
set -eu
# Accept parameters via command argments.
PROJECT_NAME=$1
# Create a project directory and move to there.
mkdir $PROJECT_NAME
cd $PROJECT_NAME
@msh5
msh5 / hello_world.sh
Last active November 10, 2019 01:57
Sample script for boy README.md (https://github.com/msh5/boy/blob/master/README.md).
#!/bin/sh
echo "Hello World !"
#!/bin/sh
set -eu
mkdir $PROJECT_NAME
cd $PROJECT_NAME
git init
go mod init
echo "#$PROJECT_NAME" > README.md
gibo dump go > .gitignore
package main
import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"os"
@msh5
msh5 / sweeper.md
Last active September 29, 2019 07:10

System

Cache

$ sudo rm -rf /System/Library/Caches/* /Library/Caches/* ~/Library/Caches/*

Core