Skip to content

Instantly share code, notes, and snippets.

@ilguzin
ilguzin / docker_adjust_memory.sh
Created May 24, 2019 10:29 — forked from scotthaleen/docker_adjust_memory.sh
Adjust Docker Machine Memory & CPU
# Adjust Docker Machine Memory+CPU
# http://stackoverflow.com/questions/32834082/how-to-increase-docker-machine-memory-mac
docker-machine stop
VBoxManage modifyvm default --cpus 2
VBoxManage modifyvm default --memory 4096
docker-machine start
@ilguzin
ilguzin / env.py
Created June 1, 2018 13:40 — forked from lethee/env.py
Sublime Text 3: Apply NVM environment
# Save this file
# mac - "~/Library/Application Support/Sublime Text 3/Packages/"
# linux - "~/.config/sublime-text-3/Packages/"
# NOTE!
# ~/.nvm/alias/default must contain full version name.
# $ nvm alias default v4.3.5
import os
#!/usr/bin/env bash
C="0" # count
while [ $C -lt 20 ]
do
case "$(($C % 4))" in
0) char="/"
;;
1) char="-"
;;
#
# Slightly tighter CORS config for nginx
#
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs
#
# Despite the W3C guidance suggesting that a list of origins can be passed as part of
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox)
# don't seem to play nicely with this.
#