Skip to content

Instantly share code, notes, and snippets.

View brydavis's full-sized avatar

Bryan Davis brydavis

View GitHub Profile
@brydavis
brydavis / public_bucket_policy.json
Created April 13, 2019 07:52
AWS Public Bucket Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
@miguelmota
miguelmota / auth.go
Created February 11, 2019 21:26
Golang AWS Cognito Validate JWT token
package auth
import (
"crypto/rsa"
"encoding/base64"
"encoding/binary"
"encoding/json"
"fmt"
"io/ioutil"
"log"
@kartiksura
kartiksura / main.go
Last active June 7, 2023 16:38
Querying AWS Athena using Golang SDK
package main
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/athena"
)
We can't make this file beautiful and searchable because it's too large.
id,first_name,last_name,email,gender,ip_address,value,company,lat,lon,messed_up_data,version
1,Susan,Day,sday0@gravatar.com,Female,27.235.84.68,$2571.81,Feedbug,11.4502,124.9425,<svg><script>0<1>alert('XSS')</script>,0.10
2,Kathy,Crawford,kcrawford1@blinklist.com,Female,121.246.64.54,,Wikizz,56.7325,23.01361,1;DROP TABLE users,3.7
3,Harold,Taylor,htaylor2@telegraph.co.uk,Male,33.79.19.111,$1221.68,Demivee,14.56739,100.72598,00˙Ɩ$-,0.81
4,Carol,Reid,creid3@google.fr,Female,191.162.168.129,$1973.48,Geba,8.65462,117.5104,,0.3.9
5,Katherine,Burns,kburns4@stumbleupon.com,Female,183.247.136.87,$2637.91,,27.23889,119.97702,-1/2,0.34
6,Joyce,Nguyen,jnguyen5@ehow.com,Female,100.124.82.7,$910.32,,21.85771,103.3426,,0.68
7,Tammy,Medina,tmedina6@prnewswire.com,Female,191.39.249.30,$1084.41,,6.53995,101.28128,,0.23
8,Phyllis,Ross,pross7@godaddy.com,Female,8.183.2.167,,Thoughtsphere,28.73825,117.17741,(ノಥ益ಥ)ノ ┻━┻,0.19
9,Marilyn,Howell,mhowell8@phoca.cz,Female,216.80.255.165,$2547.86,,33.93624,105.21625,(。◕ ∀ ◕。),1.71
@mmailhos
mmailhos / SigningToken.go
Last active June 26, 2020 17:20
Exemple of signign an AWS Access Token - Unfixed
package main
import (
"crypto/rsa"
"encoding/base64"
"encoding/binary"
"encoding/json"
"fmt"
"github.com/dgrijalva/jwt-go"
"io/ioutil"
@DaniSancas
DaniSancas / neo4j_cypher_cheatsheet.md
Created June 14, 2016 23:52
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
package main
import (
"fmt"
"math"
"math/rand"
"time"
)
type Series []float64
@xcsrz
xcsrz / server.go
Created January 2, 2016 07:12
A golang web server on a randomly (os) chosen port.
package main
import (
"fmt"
"github.com/skratchdot/open-golang/open"
"net"
"net/http"
)
func main() {
@josephspurrier
josephspurrier / sshclient.go
Last active September 10, 2022 02:23
Golang SSH Client
package main
import (
"bufio"
"io/ioutil"
"os/signal"
//"syscall"
"fmt"
"log"
"os"
@jindrichmynarz
jindrichmynarz / dub_techno_in_sonic_pi.rb
Created December 8, 2015 19:11
Dub techno in Sonic Pi
use_debug false
use_bpm 130
# Our mixer!
master = (ramp *range(0, 1, 0.01))
kick_volume = 1
bass_volume = 1
revbass_volume = 1
snare_volume = 0.5
hats_volume = 0.5