Skip to content

Instantly share code, notes, and snippets.

View wshaddix's full-sized avatar

Wes Shaddix wshaddix

View GitHub Profile
/*
* Password Hashing With PBKDF2 (http://crackstation.net/hashing-security.htm).
* Copyright (c) 2013, Taylor Hornby
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
@wshaddix
wshaddix / gist:8797934
Created February 4, 2014 03:57
Gets the week number for a given date
main () {
// get today's date
var now = new DateTime.now();
// set it to feb 10th for testing
//now = now.add(new Duration(days:7));
int today = now.weekday;
Scenario: Creating a message with a name greater than 75 characters should fail
And I fill in "Name" with "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN"
And I press "Create Message"
Then I should see "Message was not successfully created."
And I should see "Name can't be more than 75 characters."