Skip to content

Instantly share code, notes, and snippets.

View torsday's full-sized avatar

Chris Torstenson torsday

View GitHub Profile
@torsday
torsday / psr-fixer.md
Last active August 14, 2018 21:40
psr-fixer.md

php-cs-fixer

the composer way (recommended)

$ composer global require friendsofphp/php-cs-fixer

the homebrew way

@torsday
torsday / Alex's Wishlist 2015.md
Created April 20, 2015 17:20
Alex's B-Day wishlist

Alexandra's B-day List ’15

  • Grace Thompson America Girl of the year
  • New pretty cloths from Justice
  • get accessories from Justice' and Clair's
  • have Elsa washed and wet and a little brushed so she at least looks a lime atiqute with a Blue,or Purple or Red
  • Makeup
  • some kind at Electronic
  • Grandma Cindy and Gramm Gramm (grandma Dorothea) come
  • For Nick to huge or kiss me either in the morning or my birthday slumber party
@torsday
torsday / cypher_text_puzz2_cypher.txt
Created April 8, 2015 22:07
using puzzle 002 cypher
084 104 105 115 032 105 115 032 097 032 112 114 101 116 116 121 032 099 111 111 108 032 108 111 099 097 116 105 111 110 032 116 111 032 118 105 101 119 032 102 114 111 109 032 097 098 111 118 101 044 010 115 111 109 101 116 104 105 110 103 032 097 032 098 105 116 032 105 114 111 110 105 099 032 105 110 032 116 104 097 116 046 046 046 010 051 050 032 048 056 039 053 057 046 057 054 034 032 078 044 032 049 049 048 032 053 048 039 048 057 046 048 051 034 032 087 010
@torsday
torsday / cypher_text.txt
Last active August 29, 2015 14:18
Using puzzle 01 cypher
t ctdv te qzc esp qcppozx, ez dpp hsle td ecfp, hsle t cplwwj hlye ty esp
oppapde alce zq xjdpwq. t nly xlvp hslepgpc nsztnpd t hlye ty xj wtqp,
lyo t htww wtgp htes esp nzydpbfpynpd zq eszdp nsztnpd. mfe tq t hlye ez
wtgp l wtqp nwzdp ez xj oppapde opdtcpd, t slgp ez ctdv vyzhtyr hsz t
cplwwj lx lyo slgp lwhljd mppy. vyzhtyr estd, espy t nly nszzdp.
@torsday
torsday / untitled
Created January 27, 2015 17:56
plato rake error 2015-01-27
=> There was an error building fixtures
=> #<ActiveRecord::StatementInvalid: PG::UndefinedTable: ERROR: relation "staffers" does not exist
LINE 5: WHERE a.attrelid = '"staffers"'::regclass
^
: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
FROM pg_attribute a LEFT JOIN pg_attrdef d
ON a.attrelid = d.adrelid AND a.attnum = d.adnum
WHERE a.attrelid = '"staffers"'::regclass
AND a.attnum > 0 AND NOT a.attisdropped
@torsday
torsday / tci_day_notes.md
Last active August 29, 2015 14:13
preventDefault() failure

preventDefault() failure

QUESTION: preventDefault() isn't preventing a sign out link getting called.

TESTED:

  • the block is getting called. I put in an alert() in the preventDefault block, and it indeed gets called

OTHER:

@torsday
torsday / ReadingConnection.js
Created January 21, 2015 19:07
ReadingConnection.js
function ReadingConnection() {
$('.isn_expand_button').click(function () {
if ($('#' + 'reading_connection_' + this.id).is(':visible')) {
$('#' + 'reading_connection_' + this.id).hide();
$(this).addClass("isn_expand_button");
$(this).removeClass("isn_collapse_button");
$(this).html("Expand")
} else {
$('#' + 'reading_connection_' + this.id).show();
$(this).addClass("isn_collapse_button");
@torsday
torsday / cover_letter.md
Last active August 29, 2015 14:13
basic cover letter

Cover Letter (base)

2015-01-20

Hello,

I was pointed to this position via a friend, PERSON/ROLE/LOCATION, and I’m really interested in seeing if we would be a good fit for each other.

COMPANY X is a powerhouse of a company, COMPANY PURPOSE. HOW PURPOSE IS IMPORTANT TO YOU, and I’m excited at the possibility of working with a company that makes it a mission. I feel that your work is important to the world, and I would love to help you do what you do!

@torsday
torsday / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@torsday
torsday / student_assessment.js.coffee
Created December 9, 2014 23:47
firewall_trigger.coffee
complete_assessment = (e) ->
$.ajax(
type: "PATCH"
url: $('#student_view_assessment').attr('data-updateurl')
success: (data) ->
if data.error
$('<div id="flash" class="alert">').html('<p>' + data.error + '</p>').insertBefore('#student_content')
e.preventDefault()
$('#student_view_assessment').html('Submit Answers')
else