Skip to content

Instantly share code, notes, and snippets.

View nippe's full-sized avatar
🏠
Working from home

Niklas Nihlén nippe

🏠
Working from home
View GitHub Profile
webapp:
volumes:
- /var/lib/mysql
- ./cache:/tmp/cache
webapp:
ports:
- "80:80"
- "8080"
- "8000-8030:3000-3030"
...
cache:
image: redis
...
myapp:
build: .
build: /path/to/dir/with/Dockerfile
@nippe
nippe / Correct formdata
Last active November 9, 2015 12:27
Formdata using request
var reqeustOptions = {
uri: urljoin(apiBaseUrl, apiBasePath, 'SMS'),
method: 'POST',
auth: {
user: 'username',
pass: 'pwd'
},
form: {
from: fromNubmer,
to: toNumber,
@nippe
nippe / cask-install.sh
Created August 18, 2015 13:23
Caskroom install script
# Apps
apps=(
alfred
dropbox
google-chrome
slack
firefox
hazel
spotify
@nippe
nippe / elasticsearch-migration-doorman.rb
Created March 11, 2015 21:48
Elasticsearch index migration
require 'elasticsearch'
require 'redis'
require 'colorize'
unless ARGV.length == 3
puts 'Wrong number of arguments'
puts
puts 'Syntax: ruby migrate-doorman-v1.rb <elasticsearch URL> <source index> <target-index>'
puts 'Example: ruby migrate-doorman-v1.rb http://localhost:9200 doorman-v1 doorman-v2'
exit
@nippe
nippe / boxstarterscript-windev.txt
Last active August 29, 2015 14:15
boxstarter-devbox-win
Set-ExplorerOptions -showHidenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions -EnableShowFileExtensions
Set-StartScreenOptions -EnableBootToDesktop -EnableDesktopBackgroundOnStart -EnableShowStartOnActiveScreen -EnableShowAppsViewOnStartScreen -EnableSearchEverywhereInAppsView -EnableListDesktopAppsFirst
Install-WindowsUpdate -acceptEula
Disable-UAC
Disable-InternetExplorerESC
cinst notepad2 -y
cinst SublimeText3 -y
cinst sublimetext3-contextmenu -y
$ git push heroku master