Skip to content

Instantly share code, notes, and snippets.

@nathanallen
nathanallen / 20130827074204_create_words.rb
Last active December 21, 2015 18:48
Refactored Anagram Server
class CreateWords < ActiveRecord::Migration
def change
create_table :words do |t|
t.string :word
t.string :sorted_letters
t.integer :length
end
end
end
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the Socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
*/
/*1. Use basic selectors (id, class, element) to choose an element on the page.
Use the .css() method to alter at least two CSS properties of this element. */
<div id="die">
<% if @roll %>
<img src="/<%= @roll.value %>.png" title="<%= @roll.value %>" alt="the roll">
<% end %>
</div>
@nathanallen
nathanallen / form-validator.js
Last active December 22, 2015 09:39 — forked from ksolo/form-validator.js
Form Validation
$(function(){
$('form').on('submit', function(e){
e.preventDefault();
$('#errors').empty();
//EMAIL VALIDATION
var email = $('input[name="email"]').val();
if (!(/.+/.test(email))){
$('#errors').append('<li>Insert an Email</li>');
}
@nathanallen
nathanallen / keybase.md
Last active August 29, 2015 14:18
keybase.md

Keybase proof

I hereby claim:

  • I am nathanallen on github.
  • I am na (https://keybase.io/na) on keybase.
  • I have a public key whose fingerprint is 31E8 2191 8B3C 6725 049F F0BD E639 18CF 917B 15B1

To claim this, I am signing this object:

@nathanallen
nathanallen / lightning_talk_topics_wdi18.md
Last active February 17, 2016 17:25
Lightning Talk Topics - wdi18

#Lightning Talks

Your goal is to create a 5 minute presentation on a topic that is useful to your fellow developer. We encourage you to dive right in with a demo! Please also create a brief gist / cheat sheet outlining your findings and any helpful resources you discover in your research.

  • What problem does it solve?
  • How do you use it?

##Topics: (You are welcome to suggest your own.)

@nathanallen
nathanallen / demo.md
Last active August 29, 2015 14:24
A taste of Python

#Rails Lightning Talks

Your goal is to create an exceedingly brief presentation of a ruby gem (~5 min). We encourage you to try to do a live demo / have a working code example. Please also create a brief github gist (or "cheat sheet") for your fellow developers, outlining your findings, and linking to any helpful tutorials, resources, hints, and tips you discover in your research.

You should aim to answer the following questions:

  • What problem does the gem solve?
  • How do you use it in a rails app?

##Topics:

Intro Cheese