Skip to content

Instantly share code, notes, and snippets.

View harrisj's full-sized avatar

Jacob Harris harrisj

View GitHub Profile
@harrisj
harrisj / tweet_signatures.md
Last active November 24, 2020 11:03
Tweet Signatures: a simple solution for thwarting forged tweets

A Simple Solution for Faked Tweets

Recently, a somewhat large selection of my timeline was shocked by the discovery that it's simple to make a fake-looking tweet on the web. Some feared it would be only a matter of time before some news organization is suckered by a fake tweet that seems to come from a real source.

Luckily, the solution already exists, and it's something you already use constantly: GNU PrivacyGuard signatures Here is an approach for verifying a tweet is authentic and hasn't been tampered with that is so simple even @KimKardashian could figure it out. To get started, we just need to do a little setup first:

  1. Of course, you have already installed GnuPG for your own use, generated a keypair and uploaded it to a keyserver so that other people can look it up. Its email address must be publicly listed in your twitter profile.
  2. Then, you must collect the public keys of the people you fo
All rate schedule
performs an icers, defective or noncoverent accounting procedures, together with-rights
(including unpaid Fee the dollars that would be
the form of performance of a sectre-owned small business settlement proposal aracts;” the terms and conditions of Severance Program (line item number;
(B) The provisions of 47.303-3(c), the Contractor's right, Economy for Construction.
22.1007(i)(A)
@harrisj
harrisj / fake_far.txt
Created February 20, 2020 03:51
Fake FAR text
All rate schedule
performs an icers, defective or noncoverent accounting procedures, together with-rights
(including unpaid Fee the dollars that would be
the form of performance of a sectre-owned small business settlement proposal aracts;” the terms and conditions of Severance Program (line item number;
(B) The provisions of 47.303-3(c), the Contractor's right, Economy for Construction.
22.1007(i)(A)
@harrisj
harrisj / FAR.txt
Created February 20, 2020 01:47
The text of the FAR
This file has been truncated, but you can view the full file.
VOLUME I-PARTS 1 TO 51
FEDERAL
ACQUISITION
REGULATION
Issued Fiscal Year 2019 by the:
GENERAL SERVICES ADMINISTRATION
DEPARTMENT OF DEFENSE
@harrisj
harrisj / shins_girls.txt
Last active May 7, 2017 23:56
All the times the Shins mention a girl
And she was no ordinary girl
Girl, inform me, all my senses warn me
Remember the girls in the middle are always the first to fall off.
You're the girl on the wing of a barnstormer
So forget about it, girl
I gotta leave here, my girl, get on with my lonely life
Girl, you must atone some
Eyeless in the morning sun you were pale and mild, a modern girl
You'd be damned to be one of us, girl
Dare to be one of us, girl
@harrisj
harrisj / examples.txt
Created April 20, 2017 16:26
Adding even numbers between 1 and 100
Go
total := 0
for i := range 100 {
if i % 2 == 0 {
total = total + i
}
}
Rust
let evens = (0..100).filter(|&x| x % 2 == 0);
@harrisj
harrisj / gist:b652f80fb55b6301b4ed
Last active July 21, 2016 05:23
Slack notification for election_results
class SlackNotifier
def self.notify(load_id)
notify_first_votes(load_id)
notify_calls(load_id)
notify_runoffs(load_id)
notify_uncalls(load_id)
notify_ap_uncalls(load_id)
end
def self.notify_first_votes(load_id)
@harrisj
harrisj / times_machine.rb
Created April 10, 2016 01:34
My hackish Ruby script for hopping to a random NYT issue in the years 1851 - 1922 (ie, in the public domain)
#!/usr/bin/env ruby
years = (1851..1922).to_a
months = (1..12).to_a
def max_day_for_month(month, year)
case month
when 1, 3, 5, 7, 8, 10, 12
31
when 9, 4, 6, 11
@harrisj
harrisj / toasternet.html
Created January 25, 2014 01:08
ToasterNet: a theoretical paper in which we proposed using consumer electronics to build a secret supercomputer for evil ends
<HEAD>
</HEAD>
<BODY>
<H1 ALIGN=CENTER>Toaster Net: Design and Feasibility Analysis of a Java-Based Key Search System</h1>
<H2 ALIGN=CENTER>12/9/96</H2>
<H2 ALIGN=CENTER>Jake Harris, Katy King, Darrin Jewell</H2>
<HR>
<H2>Abstract</H2>
<P>As recent RSA factorization efforts have shown
@harrisj
harrisj / load.rb
Created January 16, 2014 21:11
Here's an example of doing yields in Ruby. The fail! and finished! methods set the state of the load in the DB and save the execution time
def self.audit(command = 'Load')
unless block_given?
raise ArgumentError, "You can only invoke audit with a block"
end
a = nil
begin
a = Load.create :command => command, :status => 'started', :start_time => Time.now
yield a