The idea is to use a Elastic Search Data Stream https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html
A data stream is a way to handle time-series data (such as webhook logs) that
The idea is to use a Elastic Search Data Stream https://www.elastic.co/guide/en/elasticsearch/reference/current/data-streams.html
A data stream is a way to handle time-series data (such as webhook logs) that
| package main | |
| import "database/sql" | |
| import ( | |
| "fmt" | |
| _ "github.com/go-sql-driver/mysql" | |
| "github.com/satori/go.uuid" | |
| "math/rand" | |
| "sync" | |
| ) |
| func ip2int(ip net.IP) uint32 { | |
| if len(ip) == 16 { | |
| return binary.BigEndian.Uint32(ip[12:16]) | |
| } | |
| return binary.BigEndian.Uint32(ip) | |
| } | |
| func int2ip(nn uint32) net.IP { | |
| ip := make(net.IP, 4) | |
| binary.BigEndian.PutUint32(ip, nn) |
This gist is about:
Mainly:
function cannot (should not) be used when side-effects occurCreate a new repository, or reuse an existing one.
Generate a new SSH key:
ssh-keygen -t rsa -C "[email protected]"
Copy the contents of the file ~/.ssh/id_rsa.pub to your SSH keys in your GitHub account settings (https://github.com/settings/keys).
Test SSH key:
| /* | |
| A bunch of slice helper functions | |
| All of these modify the original slice | |
| */ | |
| package main | |
| import ( | |
| "fmt" | |
| ) |
| package tar_helper | |
| import ( | |
| "archive/tar" | |
| "compress/gzip" | |
| "errors" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "os" |
People
:bowtie: |
π :smile: |
π :laughing: |
|---|---|---|
π :blush: |
π :smiley: |
:relaxed: |
π :smirk: |
π :heart_eyes: |
π :kissing_heart: |
π :kissing_closed_eyes: |
π³ :flushed: |
π :relieved: |
π :satisfied: |
π :grin: |
π :wink: |
π :stuck_out_tongue_winking_eye: |
π :stuck_out_tongue_closed_eyes: |
π :grinning: |
π :kissing: |
π :kissing_smiling_eyes: |
π :stuck_out_tongue: |