I hereby claim:
- I am dpaola2 on github.
- I am dpaola2 (https://keybase.io/dpaola2) on keybase.
- I have a public key whose fingerprint is A3F4 CA96 F237 D46F 614D 2F29 606B 2DB9 F4CD BD3C
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function WeatherService($http) { | |
this.name = "WeatherService"; | |
this.responds_to = ["current_weather"]; | |
this.send = function(intent) { | |
if (intent == "current_weather") { | |
return "cloudy with a chance of rain"; | |
} else { | |
return "I don't understand"; | |
} |
function JarvisController ($scope, $http) { | |
$scope.newRecognition = function() { | |
var r = new webkitSpeechRecognition(); | |
r.lang = "en"; | |
r.continuous = false; | |
r.onerror = function(error) { | |
console.log(error); | |
var stop = false; | |
var message = false; |
class Tweet < ActiveRecord::Base | |
def self.client | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = ENV['TWITTER_KEY'] | |
config.consumer_secret = ENV['TWITTER_SECRET'] | |
end | |
client | |
end |
Rich Hickey • 3 years ago
Sorry, I have to disagree with the entire premise here.
A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.
Mastery comes from a combination of at least several of the following:
def _resolve_host(func): | |
def resolve(host, *args, **kwargs): | |
if host in HOSTS: | |
return func(HOSTS[host], **kwargs) | |
return func(host, *args, **kwargs) | |
return resolve | |
fab clean:stage | |
fab deploy:production | |
fab deploy:192.168.1.102 |
STAGE = 'stage.example.com' | |
PRODUCTION = 'www.example.com' | |
HOSTS = { | |
'stage':STAGE, | |
'production':PRODUCTION | |
} |
class Account | |
... | |
end | |
class Transfer | |
def self.exec(acct1, acct2, amt) | |
Transaction.begin do | |
acct1.balance -= amt | |
acct2.balance += amt | |
acct1.save! |
# Pyrocfile - Simple Python impementation of Procfile manager | |
# Written by Chris Testa (http://testa.co/) in 2011 | |
# Released in the Public Domain | |
import argparse, logging, os.path, random, re, select, signal, subprocess | |
def _new_logger(name, color=None): | |
logger = logging.getLogger(name) | |
hdlr = logging.StreamHandler() | |
color, end_color = '\033[9%dm' % (color or random.randint(1, 6)), '\033[0m' |