Skip to content

Instantly share code, notes, and snippets.

Avatar

James Brooking jambroo

View GitHub Profile
@jambroo
jambroo / PrivateNote.py
Created Feb 9, 2015
Private note generation
View PrivateNote.py
#!/usr/bin/python
import os, random, struct
from Crypto.Cipher import AES
from Crypto import Random
import md5, sys, getpass, filecmp, json, shutil
from datetime import datetime
import time
class PrivateNote:
def __init__(self, fileName):
View gist:fc4ec83647e41a79464b
<!DOCTYPE html>
<html>
<head>
<style>
#song {
background-color: #CCC;
}
#song div {
width: 0;
@jambroo
jambroo / upload.rb
Created Sep 13, 2017
Use ruby to upload photos to google cloud bucket
View upload.rb
require "google/cloud/storage"
def procdir(dir)
Dir[ File.join(dir, '**', '*') ].reject { |p| File.directory? p }
end
def same_file(f, f2)
return File.exist?(f) && File.exist?(f2) && (File.size(f) == File.size(f2))
end
You can’t perform that action at this time.