- The user chooses a username and password
- A pub/priv key is generated and stored in a structure called the user blob. (A user will have the option to upload their own set of keys too)
- The user blob also contains a file tree which will store uploaded files (with their encryption key) and folders (for organizing files).
- The user blob is encrypted with the PBKDF2 hash of the user's password.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package panicker | |
import ( | |
"runtime" | |
. "testing" | |
"github.com/mediocregopher/radix/v3" | |
) | |
func BenchmarkPanic(b *B) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"log" | |
"time" | |
"github.com/mediocregopher/mediocre-go-lib/mrand" | |
radix "github.com/mediocregopher/radix.v3" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0xC34976Ee7A9dAD5d4F1802C190B0967E58b137F0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
[dependencies] | |
clap = "2" | |
*/ | |
extern crate clap; | |
use clap::{Arg, App}; | |
use std::num::Wrapping; | |
use std::io::Read; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Package brpc, stands for better-rpc. It's better than normal RPC, because it | |
// allows for saner chaining of rpc handlers | |
package brpc | |
import ( | |
"encoding/json" | |
"net/http" | |
"golang.org/x/net/context" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"os" | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
function printDep { | |
dep="$1" | |
if [ "$dep" == "." ]; then return 0; fi | |
cd "$GOPATH/src/$dep" | |
if [ -d ".git" ]; then | |
echo "$dep (git) - $(git log --abbrev-commit --oneline -n 1)" | |
return 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type Set map[interface{}]bool | |
func Intersection(s1, s2 Set) Set { | |
rs := Set{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user> (def fiz (cycle [nil nil "Fiz"])) | |
#'user/fiz | |
user> (def buzz (cycle [nil nil nil nil "Buzz"])) | |
#'user/buzz | |
user> (take 15 (map (partial apply str) (map list fiz buzz))) | |
("" "" "Fiz" "" "Buzz" "Fiz" "" "" "Fiz" "Buzz" "" "Fiz" "" "" "FizBuzz") |
NewerOlder