Twelve Go Best Practices
Francesc Campoy Flores Gopher at Google @francesc http://campoy.cat/+
- Best practices
// run with go test -test.bench Bench | |
package main | |
import ( | |
// "fmt" | |
"runtime" | |
"sync" | |
"sync/atomic" | |
"testing" |
wget --no-check-certificate --content-disposition https://github.com/joyent/node/tarball/v0.7.1 | |
# --no-check-cerftificate was necessary for me to have wget not puke about https | |
curl -LJO https://github.com/joyent/node/tarball/v0.7.1 |
Twelve Go Best Practices
Francesc Campoy Flores Gopher at Google @francesc http://campoy.cat/+
Source: http://blog.8thlight.com/uncle-bob/2013/09/23/Test-first.html
// Also available at: https://play.golang.org/p/yTTpB5gB6C | |
package main | |
import ( | |
"fmt" | |
) | |
// ***************************************************************************** | |
// Example 1 - Struct vs Struct with Embedded Type |
This plugin adds PHP CodeSniffer, PHP Code Beautifier and Fixer, PHP Coding Standards Fixer, the PHP Linter, PHP Mess Detector, Scheck support to Sublime Text.
For more information about this plugin such as features, installation requirements etc, please see: http://benmatselby.github.io/sublime-phpcs
curl -sS https://getcomposer.org/installer | php
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription
. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
THis gist was created in 2016 and I haven't been working with Facebook Leads ever since. As a result, this guide might not be accurate.
Please check @eladnava's updated step-by-step guide for 2020 here: https://eladnava.com/get-facebook-ad-lead-notifications-in-realtime-with-node-js-webhooks/
package main | |
import "database/sql" | |
import ( | |
"fmt" | |
_ "github.com/go-sql-driver/mysql" | |
"github.com/satori/go.uuid" | |
"math/rand" | |
"sync" | |
) |