Skip to content

Instantly share code, notes, and snippets.

Henry cryptix

Block or report user

Report or block cryptix

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@cryptix
cryptix / asymmetric.go
Last active Feb 13, 2020
example of using JWT for http authentication in go
View asymmetric.go
package main
// using asymmetric crypto/RSA keys
import (
"crypto/rsa"
"fmt"
"io/ioutil"
"log"
"net/http"
@cryptix
cryptix / main.go
Created Jul 29, 2014
using go/ast to find specific function calls and the values of a parameter
View main.go
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"log"
)
@cryptix
cryptix / vineScrape.go
Created Aug 27, 2014
extract a javascript object value from a html page using goquery and otto
View vineScrape.go
package main
import (
"errors"
"log"
"os"
"github.com/PuerkitoBio/goquery"
"github.com/robertkrimen/otto"
)
@cryptix
cryptix / client.go
Created Jun 22, 2014
multipart upload with io.Pipe
View client.go
package main
import (
"io"
"log"
"mime/multipart"
"net/http"
"os"
"path/filepath"
"runtime"
@cryptix
cryptix / pgpTestTool.go
Created Dec 28, 2014
PGP file encryption in golang
View pgpTestTool.go
package main
import (
"archive/zip"
"fmt"
"log"
"os"
"time"
"github.com/cryptix/go/logging"
@cryptix
cryptix / fotos.go
Created Jun 15, 2014
revel image upload example
View fotos.go
package controllers
import (
"bytes"
"image"
"image/gif"
"image/jpeg"
"image/png"
"io"
"net/http"
@cryptix
cryptix / complete.txt
Created Sep 18, 2016
zcash beta1 build failure (empty object files)
View complete.txt
This file has been truncated, but you can view the full file.
+++ readlink -f ./zcutil/build.sh
++ dirname /home/cryptix/zcash/zcutil/build.sh
+ cd /home/cryptix/zcash/zcutil/..
+ LCOV_ARG=
+ HARDENING_ARG=--enable-hardening
+ '[' x-j4 = x--enable-lcov ']'
++ pwd
+ PREFIX=/home/cryptix/zcash/depends/x86_64-unknown-linux-gnu/
+ make -j4 -C ./depends/ V=1 NO_QT=1
@cryptix
cryptix / chat.go
Created Feb 2, 2013
simple chat example in go. uses channels to match partners and goroutines for concurency
View chat.go
package main
import (
"fmt"
"io"
"log"
"net"
)
const listenAddr = "localhost:4000"
@cryptix
cryptix / connectback.go
Created Jan 17, 2014
Connect-Back shell in <50 lines of Go
View connectback.go
package main
import (
"flag"
"fmt"
"io"
"log"
"net"
"os/exec"
)
@cryptix
cryptix / smtpAuthLogin.go
Created Oct 4, 2013
implements the smtp.Auth interface to use AUTH with the LOGIN scheme.
View smtpAuthLogin.go
// mailing helpers
type loginAuth struct {
username, password string
}
func LoginAuth(username, password string) smtp.Auth {
return &loginAuth{username, password}
}
func (a *loginAuth) Start(server *smtp.ServerInfo) (string, []byte, error) {
You can’t perform that action at this time.