- 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 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") |
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
<?php | |
$dir = $_GET['request_filename']; | |
if (is_dir($dir)) { | |
if (!preg_match('/\/$/',$dir)) { | |
header("Location: ".$_SERVER['REQUEST_URI'].'/'); | |
exit; | |
} | |
print "$dir<br/><br/>"; |
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
(defn get-reference-children | |
[fn-id] ;fullname-or-id | |
(-> (select* reference) | |
(fields :id :fullname :isDir ) | |
(#(if-not (string? fn-id) | |
(where %1 {:parent_id fn-id}) | |
(where %1 {:parent_id (subselect reference | |
(fields :id) | |
(limit 1) | |
(where {:fullname fn-id}))} ))) |
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
//To make gethostname be defined | |
#define _BSD_SOURCE | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <string.h> |
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
#!/usr/bin/env python | |
import sys | |
import json | |
def main(): | |
for line in sys.stdin: | |
struct = json.loads(line) | |
clean_struct(struct) | |
clean_line = json.dumps(struct,sort_keys=True) |
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
(ns socketspam.pconn | |
(:use lamina.core aleph.tcp aleph.formats)) | |
(def socketspam-host "localhost") | |
(def socketspam-port 9000) | |
;Create an endpoint and ground it so messages don't get queued up | |
;if nothing is listening | |
(def endpoint (channel)) | |
(ground endpoint) |
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
Index: | |
{ | |
"v" : 1, | |
"key" : { | |
"arid" : 1, | |
"_id" : -1 | |
}, | |
"ns" : "feeds.artistEvents", | |
"name" : "arid_1__id_-1", | |
"background" : true |
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
.global _c_int00 ;This assembler directive allows _c_int00 to be a | |
;global variable. This tells the linker where your | |
;program (.text code) begins and where to boot from. | |
;***************************** Program Constants **************************************** | |
; Creating constants using the .set assembler directive. This should be at the top of your | |
; program. This is like a define statement in C. | |
data_sect .set 0xa000 ;constant that is actually the starting addr of .data section | |
bss_sect .set 0xb000 ;constant that is actually the starting addr of .bss section |