Skip to content

Instantly share code, notes, and snippets.


Jonathan Carter borkabrak

View GitHub Profile
View gist:fce14ac644ddd69d3e884eaf62e150d8
// Return true/false whether input string is a palindrome
function is_palindrome(input) {
// normalize input to ignore case and non-word chars
input = input.toUpperCase().replace(/\W/g,"");
// anything less than two chars is automatically a palindrome
return (input.length < 2) ?
true :
// if first and last chars differ, not a palindrome
borkabrak / gist:7453043
Created Nov 13, 2013
Output text so that it looks like someone is typing it. (Filters STDIN to STDOUT with random short intervals between characters)
View gist:7453043
#!/usr/bin/env ruby
# Print output as if someone was typing it.
# * random short intervals between characters
# I have no idea why this seems so neat to me.
# Try piping the output of w3m -dump to it.
# -jdc 2013-06-20
You can’t perform that action at this time.