Skip to content

Instantly share code, notes, and snippets.

Avatar
🙌
good times

Adam Bachman abachman

🙌
good times
View GitHub Profile
@abachman
abachman / README.md
Last active Jun 11, 2020
How to Become a Cryptographer
View README.md

Retrieved from Reddit 2015-12-10

As an undergrad who has recently become very interested in this field, I would like to know of a roadmap to develop a solid foundation in order to pursue a research career in cryptography. Things like course sequence, major/concentration, books, etc would be helpful.

Currently I'm a second year CS student and have noticed that my school's program focuses more on the practical side of things. Since cryptography requires a deep understanding of some abstract areas of math, would it be best to transfer to a pure math program?

Thanks in advance!

You should definitely have solid mathematical skills, but computer science helps as well. I did both (bachelors in both, masters in both, PhD in a mathematics/CS hybrid department).

View textarea-bonanza.rb
#!/usr/bin/env ruby
#
# Demo of the "severe typing lag" layout bug we found.
#
# Things that fix the lag:
# - set textarea width to a non-percentage value
# - set .container grid-template-rows: to anything other than `auto`, e.g.,
# `100vh` or `100%` work; or remove the property
# - set .container height: to a fixed value or remove the property
View apache-rails-proxy-ssl
# proxying through apache to a local rails instance, http & https
# apache *.conf file
<VirtualHost *:80>
ServerName psl.localhost
ServerAlias cms.psl.localhost
ServerAlias *.psl.localhost
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000/
@abachman
abachman / adafruit-io-data-OBS-browser-source.html
Created Apr 26, 2020
Locally hosted OBS Browser Source html file pulling temp + humidity from my little office weather station
View adafruit-io-data-OBS-browser-source.html
<!DOCTYPE html>
<html>
<head>
<!-- Fontawesome 5! Get it here: https://fontawesome.com/how-to-use/on-the-web/setup/hosting-font-awesome-yourself -->
<link rel="stylesheet" href="css/all.min.css" />
<style>
body {
background: rgba(0, 0, 0);
color: #ffffff;
font-size: 16px;
@abachman
abachman / download_paged_data.py
Last active Dec 17, 2019
Download data in bulk from Adafruit IO
View download_paged_data.py
#!/usr/bin/env python
"""
Download all data from a list of Adafruit IO feeds. Change constants in this
file in the CONFIGURATION section before you run the script.
Usage:
$ START="2019-05-01T00:00Z" END="2019-06-01T00:00Z" \
python download_paged_data.py
"""
@abachman
abachman / gist:78702
Created Mar 13, 2009
A bash script for listing directory trees (with color)
View gist:78702
#!/usr/bin/env bash
#
# This script produces a complete tree structure for the directory
# in which it is running.
#
# FROM
# http://www.sun.com/bigadmin/scripts/submittedScripts/lstree.sh.txt
#
# Modifications by Adam Bachman
#
@abachman
abachman / conditional_chaining_with_tap.rb
Created Oct 12, 2010
Conditional query chaining in Rails 3
View conditional_chaining_with_tap.rb
# I want a list of 6 non-administrators who are not the
# current user only if someone is logged in. Otherwise,
# don't check current_user's id.
# instead of this:
if user_signed_in?
@other_users = User.non_admin.limit(6).where("name IS NOT NULL")
else
@other_users = User.non_admin.limit(6).where(['id != ?', @user.id]).where("name IS NOT NULL")
@abachman
abachman / python-io-image-client.py
Created Jul 3, 2019
Publishing Raspberry Pi image data to Adafruit IO from Python
View python-io-image-client.py
#!/usr/bin/env python
# based on https://github.com/adafruit/io-client-python/blob/master/examples/mqtt_client.py
import io
import time
import os
# Camera setup guide: https://learn.adafruit.com/cloud-cam-connected-raspberry-pi-security-camera/pi-camera-setup
import picamera
import base64
@abachman
abachman / chart.html
Created Jun 19, 2019
Adafruit IO public feed data chart
View chart.html
<!doctype html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.css" />
<style>
body {
margin: 0; padding: 0;
View aphex-001.rb
# for Sonic Pi - http://sonic-pi.net/
live_loop :flibble do
set :n, rrand_i(1, 9)
sample :tabla_na, rate: 0.9 / (get[:n] / 2.0), amp: 1.0 / get[:n]
sleep 1.0 / get[:n]
end
live_loop :bass do
use_synth :growl
You can’t perform that action at this time.