Skip to content

Instantly share code, notes, and snippets.

View rietta's full-sized avatar
🏠
Working from home

Frank Rietta rietta

🏠
Working from home
View GitHub Profile
@rietta
rietta / superpolynomial.txt
Last active November 14, 2022 01:18
Memorize the RSA encryption algorithm as a song! This is a mirrored copy of the RSA, Superpolynomial song which has become hard to find on the Internet.
These original sources are now no longer available:
- http://www.xent.com/FoRK-archive/oct00/0429.html
- http://www.cryptorights.org/events/2000/superpolynomial.html
For a 2000 example of how to use this song in a lecture format, see http://permalink.gmane.org/gmane.comp.encryption.general/4856 by Eric Hughes.
To the tune of Mary Poppins:
Superpolynomial subexponential runtimes.
Even though in practice it would take you several lifetimes,
@rietta
rietta / sql_views.rake
Created March 6, 2015 21:00
SQL Views rake task implementing `rake db:views`
namespace :db do
desc "Update and create SQL views"
task :views => :environment do
Dir["#{Rails.root}/db/sql_views/*.sql"].each do |file_name|
STDERR.puts "Applying the SQL view at #{file_name}"
source_file = File.new(file_name, 'r')
if source_file and (sql_content = source_file.read)
ActiveRecord::Base.transaction do
# Each statement ends with a semicolon followed by a newline.

Regular talks are 45-minute blocks. We recommend 30-35 minutes of presentation, followed by allowing 10-15 minutes for questions and discussion.

Title

Defending from Data Breaches by Fostering a Culture of Security

Tracks: Culture or Crafting Code

Abstract (600 chars)

You've been hearing about big data breaches in the news. As a developer who doesn't specialize in security, knowing how to protect your application from getting hacked may seem like a daunting task. However, fundamentals in the design and development process will greatly increase the security that protects your users from harm.

For Review Committee

@rietta
rietta / keybase.md
Created January 8, 2015 04:39
Confirming for keybase

Keybase proof

I hereby claim:

  • I am rietta on github.
  • I am rietta (https://keybase.io/rietta) on keybase.
  • I have a public key whose fingerprint is EF65 AC38 A698 E87D 9CEF B60F 658C D5E9 C004 BAE3

To claim this, I am signing this object:

@rietta
rietta / bytes.rb
Created August 12, 2014 01:47
Quick and dirty command line tool to covert bytes to nibbles, kilobytes, megabytes, gigabytes, and terabytes.
#!/usr/bin/env ruby
##
# bytes
# Quick and dirty way to get a slate of byte conversions from the command line.
# Put it in your path and make it executable, by 'chmod 755 bytes'.
#
# Author: Frank Rietta
##
@rietta
rietta / humor_troll_nsa.rb
Created April 10, 2014 20:20
Fake crytpo. It's just random data.
#!/usr/bin/env ruby
require 'securerandom'
puts "
-----BEGIN PGP MESSAGE-----
Version: GnuPG v1
#{SecureRandom.hex(23423) }
-----END PGP MESSAGE-----
"
@rietta
rietta / perfect_forward_security_apache.conf
Created April 8, 2014 03:34
Apache with Perfect Forward Security
##
# SSL Configuration
#
# This is a strong configuration that will get an A+ on the SSL Labs test as of
# April 5, 2014.
#
# To test your SSL setup against the best standards, see:
# https://www.ssllabs.com/ssltest/
#
SSLEngine on
@rietta
rietta / plpgsql.rake
Last active August 8, 2020 15:05
Are you using PostgreSQL and don't want to make your app run as PostgreSQL super user, then add this custom rake task to your `lib/tasks` folder and be happy.
#
# PostgreSQL writes two optional commands to the database schema
# file, called db/structure.sql, that can only be run as a root
# database user. These are not needed actually, so comment them
# out automatically
#
# CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
# COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
#
namespace :db do
@rietta
rietta / pngcrushall.sh
Created October 2, 2013 04:34
Aggressively compress all png files in a folder. Install the following from homebrew first:
#!/bin/sh
for png in `find $1 -name "*.png"`;
do
echo "crushing $png"
pngcrush -brute "$png" temp.png
mv -f temp.png $png
done;
@rietta
rietta / arcall.sh
Created October 2, 2013 04:31
Usage: arcdir /PATH It tarball ALL subdirectories under the and moves the originals to the Trash First, install these from homebrew: brew install trash brew install pigz
#!/usr/bin/env bash
# Archive all of the children directories of a directory into compressed tar files
# and prepare a text file that lists all of the files in each archive.
# Therefore, for directories foo ane bar, produce
# foo.tar.bz2, foo.tar.txt, bar.tar.bz2, and bar.tar.txt.
###
# The trash command is OS X specific ane requires a 3rd party tool -
# brew install trash