Metadata in PDF files can be stored in at least two places:
- the Info Dictionary, a limited set of key/value pairs
- XMP packets, which contain RDF statements expressed as XML
| # Bash function gen_random_filename | |
| # Description: Generates random file names | |
| # Requires shuf (brew install coreutils) | |
| # Requires a list of adjectives and nouns (1 per line) | |
| gen_random_filename() { | |
| local adjs=~/words/adjectives.txt | |
| local nouns=~/words/nouns.txt | |
| local adj noun title starts_with_1 starts_with_2 counter | 
| // Traverses an arbitrary struct and translates all stings it encounters | |
| // | |
| // I haven't seen an example for reflection traversing an arbitrary struct, so | |
| // I want to share this with you. If you encounter any bugs or want to see | |
| // another example please comment. | |
| // | |
| // The MIT License (MIT) | |
| // | |
| // Copyright (c) 2014 Heye Vöcking | |
| // | 
| #!/bin/sh | |
| echo Install all AppStore Apps at first! | |
| # no solution to automate AppStore installs | |
| read -p "Press any key to continue... " -n1 -s | |
| echo '\n' | |
| echo Install and Set San Francisco as System Font | |
| ruby -e "$(curl -fsSL https://raw.github.com/wellsriley/YosemiteSanFranciscoFont/master/install)" | |
| echo Install Homebrew, Postgres, wget and cask | |
| ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" | 
| import javax.crypto.Cipher; | |
| class Test { | |
| public static void main(String[] args) { | |
| try { | |
| System.out.println("Hello World!"); | |
| int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); | |
| System.out.println(maxKeyLen); | |
| } catch (Exception e){ | |
| System.out.println("Sad world :("); | 
| /* | |
| * I add this to html files generated with pandoc. | |
| */ | |
| html { | |
| font-size: 100%; | |
| overflow-y: scroll; | |
| -webkit-text-size-adjust: 100%; | |
| -ms-text-size-adjust: 100%; | |
| } | 
| package main | |
| import ( | |
| "database/sql" | |
| "errors" | |
| "fmt" | |
| _ "github.com/bmizerany/pq" | |
| "os" | |
| "regexp" | |
| "strings" | 
| # FILE: Classifying Breast Cancer as Benign or Malignant | |
| # AUTHOR: Timothy P. Jurka | |
| library(RTextTools); | |
| # GET THE BREAST CANCER DATA FROM http://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/wdbc.names | |
| data <- read.csv("http://archive.ics.uci.edu/ml/machine-learning-databases/breast-cancer-wisconsin/breast-cancer-wisconsin.data",header=FALSE) | |
| data <- data[-1] | |
| # ADD TEXTUAL DESCRIPTORS FOR EACH MASS CHARACTERISTIC FOR THE DOCUMENT-TERM MATRIX | 
| package gocard | |
| import ( | |
| "fmt" | |
| "io" | |
| "crypto/md5" | |
| "crypto/sha1" | |
| "crypto/sha256" | |
| "crypto/sha512" | |
| ) | 
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs