Let's say you want to host domains first.com and second.com.
Create folders for their files:
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/signal" | |
| "syscall" | |
| ) | |
| func main() { |
| package main | |
| import ( | |
| "bufio" | |
| "log" | |
| "os" | |
| ) | |
| var concurrency = 100 |
| # For example, run "npm install" | |
| docker run -v "$PWD":/usr/src/app -w /usr/src/app node:4 npm install | |
| # This command creates a container (downloading one first if you don't have it locally), runs the command in a current directory and quits the container | |
| # Great Success! |
| <?php | |
| use Illuminate\Foundation\Testing\WithoutMiddleware; | |
| use Illuminate\Foundation\Testing\DatabaseMigrations; | |
| use Illuminate\Foundation\Testing\DatabaseTransactions; | |
| class ExamplePassportTest extends \PassportTestCase | |
| { | |
| use DatabaseTransactions; |
How to get auto-deploy working from Gitlab to your Digital Ocean (DO) server.
Install https://github.com/olipo186/Git-Auto-Deploy (via apt-get):
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:olipo186/git-auto-deploy
sudo apt-get update
sudo apt-get install git-auto-deploy
| package main | |
| import ( | |
| "fmt" | |
| "sync" | |
| "time" | |
| ) | |
| func main() { |