git submodule add https://github.com/janjarfalk/canvasrunner.git components/canvasrunner/
git submodule foreach git pull origin master
cd ..
git commit . -m "Updated submodules"
const execa = require("execa"); | |
const fs = require("fs"); | |
const awsCliGetCmd = ({ FunctionName = "", Version = "" }) => ({ | |
"list-functions": `aws lambda list-functions`, | |
"list-versions-by-function": `aws lambda list-versions-by-function --function-name ${FunctionName}`, | |
"delete-function": `aws lambda delete-function --function-name ${FunctionName} --qualifier ${Version}` | |
}); | |
const run = async cmd => { |
#!/bin/bash | |
# configure env variable STAGE, OLDPWD | |
# run command in each folder | |
set -e | |
for path in $(ls projects); do | |
if [[ -d "projects/$path" ]] | |
then | |
echo "deploying $path" |
#!/bin/bash | |
# https://medium.com/better-programming/create-github-repos-remotely-25153a6e6890 | |
# GitHub API Token | |
GH_API_TOKEN='' | |
# GitHub User Name | |
GH_USER='' | |
# Variable to store first argument to setup-repo, the repo name. Will be used as GH repo name, too. | |
NEW_REPO_NAME=$1 | |
# Store current working directory. | |
CURRENT_DIR=$PWD |
const logform = require('logform'); | |
const tripleBeam = require('triple-beam'); | |
const winston = require('winston'); | |
const errorHunter = logform.format(info => { | |
if (info.error) return info; | |
const splat = info[tripleBeam.SPLAT] || []; | |
info.error = splat.find(obj => obj instanceof Error); |
# install chocolatey (win pkg manager like apt or brew) | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
# install programing languages | |
choco install -y python3 golang nodejs # nvm instead of nodejs is a good option | |
# install apps | |
choco install -y vscode googlechrome 7zip.install vlc notepadplusplus.install git.install winscp curl putty | |
# install vm |
# Domain mapping | |
resource "google_cloud_run_domain_mapping" "default" { | |
location = "us-east1" | |
name = var.domain | |
metadata { | |
namespace = var.projectId | |
} | |
spec { |
sudo apt update | |
sudo apt upgrade | |
free -h | |
df -h | |
sudo fallocate -l 1G /swapfile | |
ls -lh /swapfile | |
sudo chmod 600 /swapfile | |
ls -lh /swapfile | |
sudo mkswap /swapfile |
sudo apt-get install libcap2-bin | |
sudo setcap cap_net_bind_service=+ep `readlink -f \`which node\`` | |
# or | |
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 900 -j REDIRECT --to-port 3000 |
chsh -s /bin/bash | |
sudo apt-get update | |
sudo apt upgrade | |
sudo apt install zsh | |
sudo apt-get install powerline fonts-powerline | |
git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh | |
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc |