Skip to content

Instantly share code, notes, and snippets.

@tra38
tra38 / pseudo_dotfiles.md
Last active April 22, 2018 04:06
Personalized Bash Settings
#Personal Aliases
alias be="bundle exec"
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export PATH="$PATH:$HOME/Library/Python/3.6/bin" # Add Python 3.6 to PATH for command-line tools

#Remove the beer in Homebrew
export HOMEBREW_NO_EMOJI=1

#Default Search Behaviors for "howdoi":
@tra38
tra38 / skynet.csv
Last active April 18, 2021 10:46
The CSV file used to generate Skynet's ██████
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
Content,SourceText,SourceURL
"Skynet is a self-aware super computer with nearly infinite resources and becomes more intelligent at an exponential rate. So why does it fight humans using something as asinine and archaic as bullets? If it wanted to win it could probably engineer a virus in a few seconds and kill off every living thing on the planet. By DESIGN it is insanely lethal, so why is it so bad at killing humans? Is it because somehow our creativity and determination have allowed us to survive? Fuck no. It's because it doesn't *want* to win.","Torbior, a Slugogar Cultist","https://www.reddit.com/r/movies/comments/1jqo8m/in_the_terminator_franchise_what_does_skynet/cbho86l/"
"Skynet wants to fight forever. It was designed for war. That is its whole *purpose*. It wants an endless war with humans, and gives them just enough hope to keep fighting forever. That's why mankind never makes any *real* progress. There is no actual 'end-game' where the humans finally triumph. They already lost when they made the da
@tra38
tra38 / censored.rb
Last active April 18, 2021 10:46
Skynet's ██████ - The MVP
require 'zombie_writer'
require 'smarter_csv'
require 'faker'
def boxes
faker_lorem = Faker::Lorem.paragraph(3, true, 4)
faker_lorem.gsub(/\w/, "█")
end
def add_censored_text_to_paragraph_start(paragraph)
@tra38
tra38 / resume.md
Last active May 10, 2017 04:09
Resume

Dear StackOverflow, I want to install nokogiri on my Mac OSX machine, but the native extensions are failing to build...what should I type in instead?

gem install nokogiri -- --use-system-libraries=true --with-xml2-include=/usr/local/opt/libxml2/include/libxml2

Source: http://stackoverflow.com/a/25068003/4765379

But StackOverflow, now nokogiri is raising a warning!

@tra38
tra38 / notes.md
Created March 20, 2017 05:48
The Origins of ZombieWriter

Note:

The following paragraphs came from a discussion I had with @danbernier in the generative-art Slack chat, in September 2016.

I refer to "Latent Semantic Indexer" and "Dumb Clustering" in this text. Latent Semantic Indexer is another name for Latent Semantic Analysis. I also mentioned searching for keywords; LSA is really good at information retreival, so I can easily search for paragraphs that are related to a user-specified keyword.

Dumb Clustering was some clustering method that I invented because I really wanted to do some clustering but didn't really know of any clustering algorithm. The clustering algorithm I invented worked as followed:

  1. The algorithm goes through a list of paragraphs..
  2. For every paragraph in the list, it finds three similar paragraphs using Latent Semantic Analysis...and then removes all of them from the list in question and places them into its own unique "cluster".
@tra38
tra38 / github-api-classes.rb
Created March 11, 2017 17:22
"GitHub API Client" Library (built as a part of DBC's Phase 4)
require 'net/http'
require 'json'
# Using this odd stuff to handle factories: http://stackoverflow.com/a/1515631/4765379
# Look like this code will be licensed as GPL for the time being
class GitHub_Request
def self.new(args)
request_uri = args[:request_uri]
personal_authentication_token = args[:personal_authentication_token]
additional_query_strings = args[:additional_query_strings] || ""
@tra38
tra38 / nanogenmo.csv
Last active April 26, 2018 11:01
CSV file used by ZombieWriter to generate news articles
Content SourceText SourceURL
I feel the publishing industry has created a model where they try to extract maximum value out of their human bloggers and treat them like assembly-line workers. There's not a lot of value in "aggregating" stories. It's just publishers trying to eek out a slice of the pie. A lot of this work will certainly be automated in the future. I feel like the quantity over quality model that Internet publishers have fallen into is flawed for the business and the consumer because there is so much replicated work and it does not take advantage of economies of scale very well. In the future, there may be fewer overall writing jobs, but they will leverage human creativity much more than the current landscape. Before the content-farming blog jobs totally go away, they will trend in the direction of editorial oversight into a more automated process. This part will probably vanish eventually as well. Ben Halpren https://dev.to/tra/nanogenmo-2016-and-my-predictions-about-text-generation/comment
@tra38
tra38 / news_articles.md
Last active March 19, 2017 18:11
News Articles generated by ZombieWriter::Randomization

0 - For a small community of computer programmers, though, NaNoWriMo has a lighthearted sister competition: National Novel Generating Month, the goal of which is to teach a computer to write a novel for you

This month, several thousand aspiring authors are attempting to write a novel in 30 days. They are taking part in an annual event known as NaNoWriMo, National Novel Writing Month, in the hope that the time pressure will spur them on. For a small community of computer programmers, though, NaNoWriMo has a lighthearted sister competition: National Novel Generating Month, the goal of which is to teach a computer to write a novel for you. However, finished NaNoGenMo projects are unlikely to trouble Booker judges. They include a version of Moby-Dick in which the words have been swapped for meows of the same length (immortal opening line: Meow me Meeeeow); another version in which a few key words have been swapped out for emoji; and

@tra38
tra38 / news_articles.md
Last active February 23, 2022 03:43
News Articles generated using ZombieWriter::MachineLearning

0 - Computers are coming for our jobs, as writers

Creative and artistic feats are often seen as the last refuge for human endeavor from the coming robot apocalypse. But if NaNoGenMo gains a foothold and improves, at least we'll all be well entertained in our unemployment.---"Computers Write Novels Faster Than You Do", Smithsonian Maganize

Computers are coming for our jobs, as writers. Spooky.---Tom Trimbath

But maybe this contest just reflects our evolution towards a more technological society. For the last 16 years November has seen “National Novel Writing Month” (or NaNoWriMo), a free event challenging amateur writers to compose a 50,000-word novel before December 1st. But two years ago it was suddenly joined by this companion event for artistically-inclined computer programmers, dubbed NaNoGenMo — drawing so