Skip to content

Instantly share code, notes, and snippets.

if (
very_long_conditional == 0 ||
more_long_conditions > 0 ||
long_to_the_xtreme > 1 ) {
lets_get_some_shit_done()
}
if (
very_long_conditional == 0 ||
more_long_conditions > 0 ||
long_to_the_xtreme > 1
) {
lets_get_some_shit_done()
}
import os, random
WORDLIST_PATHS = [os.path.join('/', 'usr', 'share', 'dict', 'words')]
DEFAULT_MESSAGE = "Are you sure you want to do this?"
WORD_PROMPT = ' [%d/%d] Type "%s" to continue (^C quits): '
def prevent_horrible_accidents(msg=DEFAULT_MESSAGE, horror_rating=1):
"""Prompt the user to enter random words to prevent doing something stupid."""
valid_wordlist_paths = [wp for wp in WORDLIST_PATHS if os.path.exists(wp)]
require 'spec_helper'
describe User do
before(:each) do
@valid_attributes = {
:name => "value for name",
:email => "[email protected]"
}
end