Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Just keep coding, just keep coding...

Alex Walker amlwwalker

💭
Just keep coding, just keep coding...
View GitHub Profile
@amlwwalker
amlwwalker / stream.go
Last active Mar 25, 2020
Golang VAD and Google Speech To Text
View stream.go
package main
import (
"bytes"
"context"
"flag"
"io"
"path/filepath"
"fmt"
@amlwwalker
amlwwalker / compressor.go
Last active Jan 15, 2020
Taking a struct, converting it to a byte array, gob encoding that, compressing it, decompressing it and converting back to a byte array/struct
View compressor.go
package compressor
import (
"bytes"
"compress/gzip"
"encoding/gob"
"fmt"
"io"
"io/ioutil"
)
@amlwwalker
amlwwalker / main.go
Created Jan 11, 2020
konsorten/go-xdeta encode/decode/apply
View main.go
package main
import (
"context"
"fmt"
"os"
"github.com/dustin/go-humanize"
"github.com/konsorten/go-xdelta"
)
@amlwwalker
amlwwalker / objects.go
Created Nov 28, 2019
Validating Nexmo Signatures on incoming webhooks
View objects.go
package nexmo
// Config holds any values required for dispatching SMS messages to Nexmo
type Config struct {
Creds *Credentials
NexmoWorkers int `env:"NEXMO_WORKERS" envDefault:"5"`
NexmoURL string `env:"NEXMO_URL" envDefault:"https://rest.nexmo.com/sms/json"`
NexmoSecretFile string `env:"NEXMO_CONFIG_FILE" envDefault:"/secrets/nexmo/nexmo.json"`
}
@amlwwalker
amlwwalker / log.txt
Last active Sep 12, 2019
error on model reset
View log.txt
detected row inserted
fatal error: unexpected signal during runtime execution
[signal SIGSEGV: segmentation violation code=0x1 addr=0xb01dfacedebac1e pc=0x63f8057]
runtime stack:
runtime.throw(0x4599bce, 0x2a)
/usr/local/go/src/runtime/panic.go:608 +0x72
runtime.sigpanic()
/usr/local/go/src/runtime/signal_unix.go:374 +0x2f2
@amlwwalker
amlwwalker / stdout
Created Sep 11, 2019
log output of attempting to take a screen capture of the currently focused window with gorobot
View stdout
version v0.90.0.896, Sierra Nevada!
{CgID:10453 AxID:73413584}
369
error <nil>
iTerm2
811008, 512, 48, 124
Assertion failed: (bitmap != NULL), function createPNGWriteInfo, file /Users/alex/go/src/github.com/go-vgo/robotgo/screen/../base/png_io_c.h, line 187.
SIGABRT: abort
PC=0x7fff68bc62c6 m=0 sigcode=0
@amlwwalker
amlwwalker / client.go
Created Mar 16, 2019
Golang Multipart upload to S3 over HTTP using tusd
View client.go
package main
import (
"bytes"
"errors"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
@amlwwalker
amlwwalker / example.js
Created Oct 30, 2018
compiling and sending ehter to a payable function from nodejs
View example.js
import ethers, {
Contract,
providers as Providers,
utils as Utils,
Wallet,
ContractFactory
} from "ethers"
import path from "path"
import fs from "fs"
@amlwwalker
amlwwalker / admin_template.blade.php
Created Oct 2, 2018
laravel-adminlte demo page after using bower
View admin_template.blade.php
<!DOCTYPE html>
<!--
This is a starter template page. Use this page to start your new project from
scratch. This page gets rid of all links and provides the needed markup only.
-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>AdminLTE 2 | Starter</title>
@amlwwalker
amlwwalker / .localenv
Created May 11, 2018
Configuration I have been using for connecting to MongoDB Atlas
View .localenv
ENVIRONMENT=development
HOSTNAME=localhost:4000
MONGODB_DB=reactnodenew
MONGODB_HOST=localhost
MONGODB_PASS=
MONGODB_PORT=27017
MONGODB_QUERIES=
MONGODB_SSL=FALSE
MONGODB_USER=
NODE_ENV=development
You can’t perform that action at this time.