This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
integer meanings: | |
runlevels: | |
0 : System halt. | |
1 : Single-User mode. | |
2 : Graphical multi-user plus networking (DEFAULT) | |
3 : Same as "2", but not used. | |
4 : Same as "2", but not used. | |
5 : Same as "2", but not used. | |
6 : System reboot. | |
pseudo-runlevels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is almost complete :) | |
// name: watchfiles.go | |
// purpose: emit a restart | |
package main | |
import ( | |
"log" // printing | |
"code.google.com/p/go.exp/inotify" // inotify events | |
"os" // argument handling | |
"os/exec" // used to call initctl restart process name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Returns an exception of your choice | |
# = Usage | |
# route_error = exception_of_type(ActionController::RoutingError) | |
# url_error = exception_of_type(ActionController::UrlGenerationError) | |
def exception_of_type(type, args = nil) | |
type.new StandardError.new(args) | |
end | |
# Gets an Airbrake::Notice object for the exception | |
# = Usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
func main() { | |
slicesOne() | |
makeSlice() | |
slicesTwo() | |
sliceInternals() | |
} |
go build: compiles the packages named by the import paths,
along with their dependencies, the binary does not end up in $GOPATH/bin
it gets created in the dirs
go build [-o output] [build flags] [packages]
If the [packages] are a list of .go files, build treats them as a list of source files specifying a single package.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"syscall" | |
) | |
func main() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'octokit' | |
class Github | |
attr_accessor :cli, :user, :gh_user | |
def initialize(user) | |
@gh_user = user | |
@cli = Octokit::Client.new(access_token: ENV["GH_KEY"]) | |
@user = @cli.user | |
@user.login | |
end |
#####Tools:
- spoon
- toothpicks
- bbq/smoker/oven
#####Ingredients:
- Jalapeño
- Bacon