This file contains hidden or 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
read () { | |
open "http://blitherocher.com" | |
} | |
article () { | |
# change in to the directory where I keep my journal project | |
cd /projects/personal_projects/personal_site | |
echo "Creating article '$@'" |
This file contains hidden or 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
// for the numbers 1 through 20, | |
for (i=1; i<=100; i++) { | |
// if the number is divisible by both 3 and 5, write "FizzBuzz" | |
if ( i % 3 ==0 && i % 5 == 0 ) { | |
console.log("FizzBuzz"); | |
} | |
// if the number is divisible by 3, write "Fizz" | |
else if ( i % 3 === 0 ) { |
This file contains hidden or 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
def FizzBuzz | |
# for numbers 1 to 100, print Fizz for multiples of 3, Buzz for multiples of 5, FizzBuzz for both | |
(1..100).each do |n| | |
print "#{n} = " | |
if n % 3 == 0 && n % 15 == 0 | |
puts "FizzBuzz" | |
elsif n % 5 == 0 | |
puts "Buzz" | |
elsif n % 3 == 0 | |
puts "Fizz" |