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
{ | |
"alpha_number": 0.6321205588285577, | |
"diff_number": 18446744073709552000, | |
"instant_number": 18467629448269930000, | |
"level": "debug", | |
"msg": "abnormal rate inside go-flow-metrics", | |
"myPeerID": "16Uiu2HAm2qhk786g2KC5KvhHqtwot2hDbCLtwN82MJUrXDAAWzYU", | |
"newTotal_number": 0, | |
"oldRate_number": 0, | |
"oldTotal_number": 818, |
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
Show hidden characters
{ | |
// enable comp-lint, this will effectively disable the live linter | |
"comp_lint_enabled": true, | |
// list of commands to run | |
"comp_lint_commands": [ | |
// run errcheck to catch ignored error return values | |
{ | |
"cmd": ["errcheck"] | |
}, |
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
// ReadAll expects a pointer to a slice of poitners to some concrete type | |
// which implements Model (e.g., *[]*Todo). GetAll will send a GET request to | |
// a RESTful server and scan the results into models. It expects a json array | |
// of json objects from the server, where each object represents a single Model | |
// of some concrete type. It will use the RootURL() method of the models to | |
// figure out which url to send the GET request to. | |
func ReadAll(models interface{}) <-chan error { | |
// We expect some pointer to a slice of models. Like *[]Todo | |
// First Elem() givew us []Todo | |
// Second Elem() gives us Todo |
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 | |
// ... | |
func main() { | |
// ... | |
app.Router.Handle("/", wade.Page{ | |
Id: "pg-home", | |
Title: "Home", | |
Template: "templates/home.html", |
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 controllers | |
// ... | |
func Home(p *wade.PageScope) error { | |
// ... | |
} |
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 | |
// ... | |
func main() { | |
// Create a new wade app. | |
app := wade.NewApp() | |
app.BasePath: "/web" | |
// Set up routing |
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
{ | |
"method": "static_path_find", | |
"params": [ | |
{ | |
"source_account": "ghcbddeFMRKW2UJJPwCVonfjoM8u8FKLpP", | |
"destination_account": "gr7GbiGNxK3vaiFEZEZiDJ3pU8qAwCy9H", | |
"destination_amount": { | |
"currency": "USD", | |
"value": "5", | |
"issuer": "g4h9WMQ6gbFHLAnVHZy7pEPueHbdLMXT8u" |
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
Verifying myself: My Bitcoin username is +albrow. https://onename.io/albrow |
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
### | |
# A bookmarking implementation based on | |
# http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html | |
# and https://news.ycombinator.com/item?id=6229001 | |
# and https://gist.github.com/albrow/10684515 | |
# | |
# put this in ~/.bash_profile or ~/.bashrc | |
# | |
# USAGE: | |
# mark <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
import ( | |
"fmt" | |
"log" | |
"os" | |
"sort" | |
) | |
// askForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and | |
// then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as | |
// confirmations. If the input is not recognized, it will ask again. The function does not return |
NewerOlder