Skip to content

Instantly share code, notes, and snippets.

@bendoane
Created October 6, 2015 03:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bendoane/075241d2ada40843d436 to your computer and use it in GitHub Desktop.
Save bendoane/075241d2ada40843d436 to your computer and use it in GitHub Desktop.
Week One, Day One: Generate some lipsum
lipsum_wanted = ARGV[0].dup if ARGV[0]
paragraphs_wanted = ARGV[1].dup if ARGV[1]
if lipsum_wanted
lipsum_wanted.downcase!
end
paragraphs_wanted= paragraphs_wanted.to_i
if paragraphs_wanted<1
puts "You want lipsum, right? Yes or No: "
answer= STDIN.gets.chomp
answer.downcase!
if answer=="yes"
puts "How many paragraphs would you like?: "
paragraphs_wanted=STDIN.gets.chomp
paragraphs_wanted=paragraphs_wanted.to_i
if paragraphs_wanted<1
loop do
puts "...I'm getting tired of your shit. Gimme a number I can use."
puts "How many paragraphs would you like?: "
paragraphs_wanted=STDIN.gets.chomp
paragraphs_wanted=paragraphs_wanted.to_i
break if paragraphs_wanted>=1
end
if lipsum_wanted=="angry"||lipsum_wanted=="classic"||lipsum_wanted=="modern"
if lipsum_wanted == "angry"
paragraphs_wanted.times do
puts "Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that shit? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that shit."
end
elsif lipsum_wanted == "classic"
paragraphs_wanted.times do
puts "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
end
else lipsum_wanted == "modern"
paragraphs_wanted.times do
puts "Odd Future Etsy narwhal aesthetic yr swag. Meh selvage irony, roof party mixtape 8-bit plaid slow-carb kale chips Intelligentsia health goth Tumblr master cleanse. Messenger bag small batch cliche four dollar toast. Beard Blue Bottle sartorial quinoa lomo, chillwave four dollar toast aesthetic fixie vegan small batch cred freegan brunch leggings. 8-bit master cleanse synth, roof party actually deep v whatever umami Thundercats fap keytar chillwave VHS church-key blog. Ennui authentic chia, meh Helvetica fanny pack 90's Wes Anderson. Godard food truck wayfarers, fingerstache Helvetica flannel twee distillery High Life cornhole taxidermy kogi Williamsburg."
end
end
else
loop do
puts "(Whoops! Let's make sure we're clear) Please select your lipsum type - classic, modern, or angry: "
lipsum_wanted=STDIN.gets.chomp
lipsum_wanted.downcase!
break if lipsum_wanted=="classic"||lipsum_wanted=="modern"||lipsum_wanted=="angry"
if lipsum_wanted == "angry"
paragraphs_wanted.times do
puts "Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that shit? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that shit."
end
elsif lipsum_wanted == "classic"
paragraphs_wanted.times do
puts "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
end
else lipsum_wanted == "modern"
paragraphs_wanted.times do
puts "Odd Future Etsy narwhal aesthetic yr swag. Meh selvage irony, roof party mixtape 8-bit plaid slow-carb kale chips Intelligentsia health goth Tumblr master cleanse. Messenger bag small batch cliche four dollar toast. Beard Blue Bottle sartorial quinoa lomo, chillwave four dollar toast aesthetic fixie vegan small batch cred freegan brunch leggings. 8-bit master cleanse synth, roof party actually deep v whatever umami Thundercats fap keytar chillwave VHS church-key blog. Ennui authentic chia, meh Helvetica fanny pack 90's Wes Anderson. Godard food truck wayfarers, fingerstache Helvetica flannel twee distillery High Life cornhole taxidermy kogi Williamsburg."
end
end
end
end
else
if lipsum_wanted=="angry"||lipsum_wanted=="classic"||lipsum_wanted=="modern"
if lipsum_wanted == "angry"
paragraphs_wanted.times do
puts "Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that shit? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that shit."
end
elsif lipsum_wanted == "classic"
paragraphs_wanted.times do
puts "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
end
else lipsum_wanted == "modern"
paragraphs_wanted.times do
puts "Odd Future Etsy narwhal aesthetic yr swag. Meh selvage irony, roof party mixtape 8-bit plaid slow-carb kale chips Intelligentsia health goth Tumblr master cleanse. Messenger bag small batch cliche four dollar toast. Beard Blue Bottle sartorial quinoa lomo, chillwave four dollar toast aesthetic fixie vegan small batch cred freegan brunch leggings. 8-bit master cleanse synth, roof party actually deep v whatever umami Thundercats fap keytar chillwave VHS church-key blog. Ennui authentic chia, meh Helvetica fanny pack 90's Wes Anderson. Godard food truck wayfarers, fingerstache Helvetica flannel twee distillery High Life cornhole taxidermy kogi Williamsburg."
end
end
else lipsum_wanted!="angry"||lipsum_wanted!="classic"||lipsum_wanted!="modern"
loop do
puts "(Whoops! Let's make sure we're clear) Please select your lipsum type - classic, modern, or angry: "
lipsum_wanted=STDIN.gets.chomp
lipsum_wanted.downcase!
break if lipsum_wanted=="angry"||lipsum_wanted=="classic"||lipsum_wanted=="modern"
end
end
end
elsif answer=="no"
puts "Then why are you running this?"
else
loop do
puts "It was a 'yes' or 'no' question...Do you want lipsum?"
answer= STDIN.gets.chomp
answer.downcase!
break if answer=="yes"||answer=="no"
end
if answer=="yes"
puts "How many paragraphs would you like?: "
paragraphs_wanted=STDIN.gets.chomp
paragraphs_wanted=paragraphs_wanted.to_i
if paragraphs_wanted<1
loop do
puts "...I'm getting tired of your shit. Gimme a number I can use."
puts "How many paragraphs would you like?: "
paragraphs_wanted=STDIN.gets.chomp
paragraphs_wanted=paragraphs_wanted.to_i
break if paragraphs_wanted>=1
end
if lipsum_wanted=="angry"||lipsum_wanted=="classic"||lipsum_wanted=="modern"
if lipsum_wanted == "angry"
paragraphs_wanted.times do
puts "Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that shit? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that shit."
end
elsif lipsum_wanted == "classic"
paragraphs_wanted.times do
puts "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
end
else lipsum_wanted == "modern"
paragraphs_wanted.times do
puts "Odd Future Etsy narwhal aesthetic yr swag. Meh selvage irony, roof party mixtape 8-bit plaid slow-carb kale chips Intelligentsia health goth Tumblr master cleanse. Messenger bag small batch cliche four dollar toast. Beard Blue Bottle sartorial quinoa lomo, chillwave four dollar toast aesthetic fixie vegan small batch cred freegan brunch leggings. 8-bit master cleanse synth, roof party actually deep v whatever umami Thundercats fap keytar chillwave VHS church-key blog. Ennui authentic chia, meh Helvetica fanny pack 90's Wes Anderson. Godard food truck wayfarers, fingerstache Helvetica flannel twee distillery High Life cornhole taxidermy kogi Williamsburg."
end
end
end
else
if lipsum_wanted=="angry"||lipsum_wanted=="classic"||lipsum_wanted=="modern"
if lipsum_wanted == "angry"
paragraphs_wanted.times do
puts "Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that shit? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that shit."
end
elsif lipsum_wanted == "classic"
paragraphs_wanted.times do
puts "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
end
else lipsum_wanted == "modern"
paragraphs_wanted.times do
puts "Odd Future Etsy narwhal aesthetic yr swag. Meh selvage irony, roof party mixtape 8-bit plaid slow-carb kale chips Intelligentsia health goth Tumblr master cleanse. Messenger bag small batch cliche four dollar toast. Beard Blue Bottle sartorial quinoa lomo, chillwave four dollar toast aesthetic fixie vegan small batch cred freegan brunch leggings. 8-bit master cleanse synth, roof party actually deep v whatever umami Thundercats fap keytar chillwave VHS church-key blog. Ennui authentic chia, meh Helvetica fanny pack 90's Wes Anderson. Godard food truck wayfarers, fingerstache Helvetica flannel twee distillery High Life cornhole taxidermy kogi Williamsburg."
end
end
else lipsum_wanted!="angry"||lipsum_wanted!="classic"||lipsum_wanted!="modern"
loop do
puts "(Whoops! Let's make sure we're clear) Please select your lipsum type - classic, modern, or angry: "
lipsum_wanted=STDIN.gets.chomp
lipsum_wanted.downcase!
break if lipsum_wanted=="angry"||lipsum_wanted=="classic"||lipsum_wanted=="modern"
end
end
end
else answer=="no"
puts "Then why are you running this?"
end
end
end
if lipsum_wanted == "angry"
paragraphs_wanted.times do
puts "Now that there is the Tec-9, a crappy spray gun from South Miami. This gun is advertised as the most popular gun in American crime. Do you believe that shit? It actually says that in the little book that comes with it: the most popular gun in American crime. Like they're actually proud of that shit."
end
elsif lipsum_wanted == "classic"
paragraphs_wanted.times do
puts "On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse pains."
end
else lipsum_wanted == "modern"
paragraphs_wanted.times do
puts "Odd Future Etsy narwhal aesthetic yr swag. Meh selvage irony, roof party mixtape 8-bit plaid slow-carb kale chips Intelligentsia health goth Tumblr master cleanse. Messenger bag small batch cliche four dollar toast. Beard Blue Bottle sartorial quinoa lomo, chillwave four dollar toast aesthetic fixie vegan small batch cred freegan brunch leggings. 8-bit master cleanse synth, roof party actually deep v whatever umami Thundercats fap keytar chillwave VHS church-key blog. Ennui authentic chia, meh Helvetica fanny pack 90's Wes Anderson. Godard food truck wayfarers, fingerstache Helvetica flannel twee distillery High Life cornhole taxidermy kogi Williamsburg."
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment