Couldn't find the text of this for a while...
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
# Maybe not the worst monkey patch ever, but don't do this | |
class Numeric | |
def is_what_percent_of(num) | |
100 * (self.to_f/num) | |
end | |
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
up up down down left right left right b a [enter] | |
? | |
esc | |
j | |
k | |
G | |
g h | |
g g | |
g p | |
g n |
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
def caesar(key, text) | |
az = ('A'..'Z').to_a | |
rt = az.rotate(key) | |
chars = text.split('') | |
.select { |c| az.include?(c) } | |
.map { |c| rt[az.index(c)] } | |
.join('') | |
end |
This is a huge pain in the butt process. Work in progress.
ionic start myapp tabs
cd myapp
npm install --save-dev gulp-typescript browserify tsify typings typescript vinyl-buffer vinyl-source-stream
(I'm not using all of these yet)- Edit gulpfile:
Mark Hamill - P.O. Box 287, Grand Blanc, MI 48480, USA- Harrison Ford - P.O. Box 49344, Los Angeles, CA 90049-0344, USA
- Dave Grohl -
- Josh Freese - Rebel Waltz, Inc., 31652 2nd Avenue, Laguna Beach, CA 92651, USA
- Tom Hanks - Playtone, P.O. Box 7340, Santa Monica, CA 90406-7340, USA
- Bill Murray - Ziffren, Brittenham, 1801 Century Park West, Los Angeles, CA 90067-6406, USA
- Dan Akroyd - Applied Action Research Corp., 859 Hollywood Way, Box 497, Burbank, CA 91505, USA
- John Cleese - Phil McIntyre Management Ltd., 3rd Floor, 85 Newman Street, London, W1T 3EU, UK
I hereby claim:
- I am flanger001 on github.
- I am flanger001 (https://keybase.io/flanger001) on keybase.
- I have a public key ASAk-Xk1h0680J2gvJ2DHU3IRBOCPrGN-ejC18u2JN19wgo
To claim this, I am signing this object:
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
# An object-oriented breakfast | |
class Mug(object): | |
def __init__(self, article): | |
self.article = article | |
print('You put a', self.article.get_name().lower(), 'in the mug') | |
def heat(self, heater, time): | |
heater.heat(self.article, time) | |
def get_article(self): |
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
class A | |
def foo | |
'hello' | |
end | |
alias_method :bar, :foo | |
end | |
class B < A | |
def foo | |
'bye' |
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
# Now more objecty | |
class PotOfCoffee | |
attr_reader :scoops | |
def initialize(quantity: 12, strength: :normal) | |
@quantity = quantity | |
@strength = strength | |
end |