This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'spec_helper' | |
describe User do | |
before(:each) do | |
@valid_attributes = { | |
:name => "value for name", | |
:email => "[email protected]" | |
} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( | |
very_long_conditional == 0 || | |
more_long_conditions > 0 || | |
long_to_the_xtreme > 1 | |
) { | |
lets_get_some_shit_done() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ( | |
very_long_conditional == 0 || | |
more_long_conditions > 0 || | |
long_to_the_xtreme > 1 ) { | |
lets_get_some_shit_done() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>> if (foo || true) then 'Hi' else 'Bye' end | |
NameError: undefined local variable or method `foo' for main:Object | |
from (irb):1 | |
>> foo = nil | |
=> nil | |
>> if (foo || true) then 'Hi' else 'Bye' end | |
=> "Hi" | |
>> foo = false | |
=> false | |
>> if (foo || true) then 'Hi' else 'Bye' end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
traditional <- data.frame( | |
a = 4, | |
b = list('caterpillars', 'porcupines', 'elephants', | |
'electric eels that approach silently', | |
paste(something()) | |
) | |
) | |
lispy <- | |
data.frame(a = 4, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CC=gcc | |
CFLAGS=-Wall -g SND_FILE=.SUFFIX= | |
.SUFFIX=.c.o | |
all : rra2wav wav2rra rraamplitude rraspeed audiocc rravocoder rrahartley rralog_compress rraecho rrawave_gen rrasquare_gen rratriangle_gen rracrush rracat | |
rra2wav : rra.o rra2wav.o | |
$(CC) $(CFLAGS) $(SND_FILE) -o rra2wav rra2wav.o rra.o | |
wav2rra : rra.o wav2rra.o | |
$(CC) $(CFLAGS) $(SND_FILE) -o wav2rra wav2rra.o rra.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 #! /usr/bin/env ruby | |
2 | |
3 $:.unshift(File.dirname(__FILE__) + '/../lib') unless | |
4 $:.include?(File.dirname(__FILE__) + '/../lib') | |
5 | |
6 require 'parser' | |
7 require 'test/unit' | |
8 | |
9 | |
10 class ParserTest < Test::Unit::TestCase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i64478@SysEngineering1:~$ perl <<PERL | |
> # Note that there is no need for a -e flag. | |
> print "Helo, world!\n"; | |
> PERL | |
Helo, world! | |
i64478@SysEngineering1:~$ perl -e 'print "Hello, world!\n";' | |
Hello, world! | |
i64478@SysEngineering1:~$ perl 'print "Hello, world!\n";' | |
Can't open perl script "print "Hello, world!\n";": No such file or directory | |
i64478@SysEngineering1:~$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
ORIGINAL SOURCE: | |
I yelled out, "Hello!" | |
But was it too late? | |
There was not a word in reply -- none | |
I will say nothing if you call back, you know | |
How could I? Did I never truly love you? | |
Perhaps tomorrow we will know why |
OlderNewer