I hereby claim:
- I am waseem on github.
- I am waseem (https://keybase.io/waseem) on keybase.
- I have a public key whose fingerprint is 5F03 7EE0 0E7B 755E 1AE7 36ED BFC9 960F AB10 5B41
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Class User < ActiveRecord::Base | |
def update_password(params) | |
if authenticate(params['current_password']) | |
self.password = params['password'] | |
self.password_confirmation = params['password_confirmation'] | |
class << self | |
validates :password, length: { minimum: 6 } | |
end | |
!!save | |
else |
class ResourceArchiver | |
def archive_resource | |
@resource_downloader.download_resource # download_resource is already tested properly | |
@resource_downloader.archive # archive is already tested properly | |
upload_resource_archive # upload_resource_archive s already tested properly | |
end | |
end |
$ AWS_ACCESS_KEY=SOME_KEY AWS_SECRET_KEY=SOME_SECRET_KEY ansible -i ec2.py -u ubuntu us-east-1b -m ping | |
File "/home/waseem/Repositories/Learning/Ansible/ec2.py", line 168 | |
print data_to_print | |
^ | |
SyntaxError: invalid syntax | |
ERROR: failed to parse executable inventory script results: {'msg': '', 'failed': True, 'parsed': False} |
console.log($scope.accessRef.constructor.toString()); // => function Object() { [native code] } | |
console.log(Object.prototype.toString($scope.accessRef)); // => [object Object] |
getConversation: function (id, endAt) { | |
if (endAt) { | |
return $firebase($fbCurrent.child('messages').child(id).endAt(null, endAt).limit(16)).$asArray(); | |
} else { | |
return $firebase($fbCurrent.child('messages').child(id)).$asArray(); | |
} | |
} |
authors = [ | |
%{ name: "Jose", langauge: "Elixir" }, | |
%{ name: "Matz", langauge: "Ruby" }, | |
%{ name: "Larry", language: "Perl" } | |
] | |
language_with_an_r = fn (:get, collection, next_fn) -> | |
for row <- collection do | |
if String.contains?(row.language, "r") do | |
next_fn.(row) |
# contracts_controller.rb | |
class ContractsController < ApplicationController | |
respond_to :html, :xls | |
# GET /contracts | |
# GET /contracts.json | |
def all | |
@contracts = Contract.all_items_i_can_view(current_user) | |
respond_to do |format| |
irb(main):001:0> class Fookamachi | |
irb(main):002:1> def hackety_hack | |
irb(main):003:2> proc do | |
irb(main):004:3* def hello | |
irb(main):005:4> 'hello' | |
irb(main):006:4> end | |
irb(main):007:3> end | |
irb(main):008:2> end | |
irb(main):009:1> end | |
=> :hackety_hack |
def cats_text(count = 0) | |
return "Cats (" + count.to_s + ")" if count > 1 | |
"Cats" | |
end |