Skip to content

Instantly share code, notes, and snippets.

@sjtipton
sjtipton / .bash_profile
Last active September 30, 2015 05:37
Steve's bash_profile setup
#export PATH="/usr/local/bin:/usr/local/sbin:~/bin:$PATH"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export EDITOR="sublime --wait"
# Python
# export WORKON_HOME=$HOME/Envs
# export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python
# export PIP_VIRTUALENV_BASE=$WORKON_HOME
@sjtipton
sjtipton / duel_draw_app.md
Created March 22, 2012 20:50
Writeboard ideas for Duel Draw Facebook App, DE Hackathon III

Duel Draw

Completed items are striked through

  • DataMapper gem to mimic ActiveRecord
  • Shared Database Add-on
  • Dictionaries for about 5 nouns
  • Drawings (belongs_to user, User has many drawings, [noun, uri, user_id])
  • Votes (belongs_to user, User has_one vote, [user_id, drawing_id, created_at])
1) Application-wide Error Handling listing a Company's Job Postings given a non-existent Company when visiting the Company Job Postings page as a non-signed in visitor should have response code of 404
Failure/Error: visit company_job_postings_path(@invalid_company_id)
Pulsar::UnauthorizedAccess:
You need to sign in or sign up before continuing.
# ./app/controllers/company_job_postings_controller.rb:6:in `index'
# ./spec/acceptance/non-selenium-dependent/standard_error_handling_spec.rb:48:in `block (5 levels) in <top (required)>'
2) Application-wide Error Handling listing a Company's Job Postings given a non-existent Company when visiting the Company Job Postings page as a non-signed in visitor should show the 404 page
Failure/Error: visit company_job_postings_path(@invalid_company_id)
Pulsar::UnauthorizedAccess:
@sjtipton
sjtipton / redis-6380.conf
Created September 17, 2012 14:39
Sample redis configuration
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specifiy
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@sjtipton
sjtipton / sortable_collection.rb
Created March 28, 2013 15:54
Sort a collection of hash key-value pairs (e.g. facets returned from a Websolr search)
module SortableCollection
class Sorter
def self.sort_collection(collection, opts={})
options = opts.select { |k,v| (k.in? valid_sorting_options) && (v.in? valid_sorters) }
current_sorter = options[:sort_by].to_sym
if options[:direction] == "asc"
collection.sort { |a,b| a[current_sorter] <=> b[current_sorter] }
else
Failures:
1) A Hiring Manager can navigate job applications show pages as a signed in Company Admin when on Job Applications index page for job posting with two applications sorting options sorting by Screening Score desc should re-arrange cards so that the card with higher score is first
Failure/Error: @second_card_name = @sorted_cards.second.find("h3").text
NoMethodError:
undefined method `second' for #<Capybara::Result:0x007f9d0c2a5d68>
# ./spec/acceptance/webdriver-dependent/users/hiring_manager/hiring_manager_navigate_job_applications_spec.rb:70:in `block (6 levels) in <top (required)>'
2) A Hiring Manager can navigate job applications show pages as a signed in Company Admin when on Job Applications index page for job posting with two applications sorting options sorting by Screening Score desc navigate into application show page should have second applicant's name
Failure/Error: @second_card_name = @sorted_cards.second.find("h3").text
Failures:
1) A Company Admin can navigate job applications show pages as a signed in Company Admin when on Job Applications index page for job posting with two applications sorting options sorting by Screening Score desc should re-arrange cards so that the card with higher score is first
Failure/Error: @second_card_name = @sorted_cards.second.find("h3").text
NoMethodError:
undefined method `second' for #<Capybara::Result:0x007ff489062720>
# ./spec/acceptance/webdriver-dependent/users/company_admin/company_admin_navigate_job_applications_spec.rb:75:in `block (6 levels) in <top (required)>'
2) A Company Admin can navigate job applications show pages as a signed in Company Admin when on Job Applications index page for job posting with two applications sorting options sorting by Screening Score desc navigate into application show page should have second applicant's name
Failure/Error: @second_card_name = @sorted_cards.second.find("h3").text
@sjtipton
sjtipton / postgres-build-notes.md
Last active December 24, 2015 12:29
Postgres Post-installation Build Notes

LinkedIn's Intro - an Intro to Insecurity Heaven for Attackers?

Continuing on the discussion from this week in regards to email security, I think it would be a good opportunity to discuss the objectives behind LinkedIn's new email service, Intro. The service has raised an eyebrow of many in the technological blogosphere in the past month. Richard Bejtlich, chief research officer at Mandiant, cannot come to a logical realization that "someone thought this was a good idea." (Perlroth, 2013) Describing his reaction as "flabbergasted," Perlroth reveals what security researchers are warning as "a dream come true for hackers or intelligence agencies" in regards to the professional network's new mobile app.

So what is Intro? Perlroth describes in the New York Times Technology article that this new mobile app is "an e-mail plug-in for iOS users that pulls LinkedIn profile information into e-mails so that the sender’s job title appears front-and-center in e-mails on a user’s iPhone or iPad." While some describe t