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
$ heroku login
Enter your Heroku credentials.
Email: niklas@hardcoded.se
Password (typing will be hidden):
Authentication successful.
updating...done. Updated to 3.26.0
$ heroku create --region eu
Creating gentle-sands-946h7... done, region is eu
https://gentle-sands-9467.herokuapp.com/ | https://git.heroku.com/gentle-sands-9467.git
Git remote heroku added
$ heroku apps:rename acastbot
$ heroku config:add HEROKU_URL=https://botname.herokuapp.com
$ heroku config:add HUBOT_SLACK_TOKEN=xoxb-1234-5678-12345-12345
$ heroic add ons:add redistogo:nano
Adding redistogo:nano on acastbot... done, v7 (free)
Use `heroku addons:docs redistogo` to view documentation.
web: bin/hubot --adapter slack --name botname
$ git push heroku master
@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
@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 / cask-install.sh
Created August 18, 2015 13:23
Caskroom install script
# Apps
apps=(
alfred
dropbox
google-chrome
slack
firefox
hazel
spotify
@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,