start new:
tmux
start new with session name:
tmux new -s myname
| #!/bin/bash | |
| # | |
| # Watch current directory (recursively) for file changes, and execute | |
| # a command when a file or directory is created, modified or deleted. | |
| # | |
| # Written by: Senko Rasic <[email protected]> | |
| # | |
| # Requires Linux, bash and inotifywait (from inotify-tools package). | |
| # | |
| # To avoid executing the command multiple times when a sequence of |
| <?php | |
| abstract class Command { | |
| abstract public function unExecute (); | |
| abstract public function Execute (); | |
| } | |
| class concreteCommand extends Command { | |
| private $operator,$operand,$calculator; | |
| public function __construct ($calculator,$operator,$operand) { | |
| $this->operator = $operator; | |
| $this->operand = $operand; |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "fmt" | |
| "io" | |
| "log" | |
| ) |
| type ( | |
| // BuoyCondition contains information for an individual station. | |
| BuoyCondition struct { | |
| WindSpeed float64 `bson:"wind_speed_milehour"` | |
| WindDirection int `bson:"wind_direction_degnorth"` | |
| WindGust float64 `bson:"gust_wind_speed_milehour"` | |
| } | |
| // BuoyLocation contains the buoy's location. | |
| BuoyLocation struct { |
If you see this error when cron job runs a ruby script:
'require': cannot load such file ...
And you are using bundler e.g. require 'bundler/setup'. It's probably because the directory where cron runs the script is not correct, resulting in bundler fails to load gems.
Simply changed the directory to fix it, i.e.
* * * * * /usr/local/bin/ruby -C /home/example/scripts example_script.rb >>/home/example/log/cron.log 2>&1
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
... or Why Pipelining Is Not That Easy
Golang Concurrency Patterns for brave and smart.
By @kachayev
| all: cover build | |
| coverFile := $(shell mktemp -u -t cover.out.XXXXXX) | |
| projectName := $(shell basename `pwd`) | |
| hasGocov := #$(shell which gocov) | |
| packages := $(shell go list ./...) | |
| ifndef OUTPUT | |
| OUTPUT = "text" | |
| endif |