###set global $GOPATH ~/.zshrc && add bin folder
export GOPATH="$HOME/projects/golang"
export PATH="$GOPATH/bin:$PATH"
###install gonew & golint
go get github.com/bmatsuo/gonew
go get github.com/golang/lint/golint
| class Delivery | |
| WEIGHT_COEFFICIENT = 1 | |
| VOLUME_COEFFICIENT = 1 | |
| def initialize(order) | |
| @order = order | |
| end | |
| def cost | |
| @order.weight * WEIGHT_COEFFICIENT + @order.volume * VOLUME_COEFFICIENT | 
| # 1. Clear retry set | |
| Sidekiq::RetrySet.new.clear | |
| # 2. Clear scheduled jobs | |
| Sidekiq::ScheduledSet.new.clear | |
| # 3. Clear 'Processed' and 'Failed' jobs | 
| package main | |
| import ( | |
| "fmt" | |
| "gopkg.in/mgo.v2" | |
| "gopkg.in/mgo.v2/bson" | |
| "time" | |
| ) | |
| type Content struct { | 
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| ) | |
| // Suggestions from golang-nuts | |
| // http://play.golang.org/p/Ctg3_AQisl | 
###set global $GOPATH ~/.zshrc && add bin folder
export GOPATH="$HOME/projects/golang"
export PATH="$GOPATH/bin:$PATH"
###install gonew & golint
go get github.com/bmatsuo/gonew
go get github.com/golang/lint/golint
| #!/usr/bin/env ruby | |
| require 'terminal-notifier' | |
| event, arg1, arg2, filename = ARGV | |
| history = "#{Dir.home}/.mcabber/histo" | |
| filename = "#{history}/#{arg2}" | |
| log = File.open "#{Dir.home}/.mcabber/eventcmd.log", 'a' | 
Create droplet of your liking (ubuntu 12.10 x32)
ssh to root in terminal with your server ip
ssh [email protected]
Add ssh fingerprint and enter password provided in email
SSH into Root
$ ssh [email protected]
Change Root Password
| = semantic_nested_form_for @gallery, multipart: true do |form| | |
| = form.input :file_multiple, as: :file, input_html: { multiple: true } | |
| = form.actions do | |
| = form.action :submit | 
| # In your app's root. | |
| # Make Pow!! export all the env variables contained in the .env file used by Foreman. | |
| export $(cat .env) |