I hereby claim:
- I am yspro on github.
- I am yspro (https://keybase.io/yspro) on keybase.
- I have a public key ASDlBjBkQf2lJ6xZzqVE-h-skz46W2HVb11RSKOHAIFcOAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| if fork | |
| puts 'YES' | |
| else | |
| puts 'NO' | |
| end |
| module Luhn | |
| extend self | |
| def valid_cc?(num) | |
| sum(num) % 10 == 0 | |
| end | |
| def string_with_check_number(string) | |
| sum = sum(string, true) | |
| "#{string}#{check_digit(sum)}" |
| { | |
| "domain":{ | |
| "dominder_api_response_code":3, | |
| "registrar_info":{ | |
| "registrar":"GoDaddy.com, LLC (http://www.godaddy.com)", | |
| "created_date":"2011-04-20", | |
| "expiration_date":"2013-04-20", | |
| "updated_date":"2011-06-06", | |
| "status":"clientRenewProhibited" | |
| }, |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <domain> | |
| <dominder-api-response-code type="integer">3</dominder-api-response-code> | |
| <registrar-info> | |
| <registrar>GoDaddy.com, LLC (http://www.godaddy.com)</registrar> | |
| <created-date>2011-04-20</created-date> | |
| <expiration-date>2013-04-20</expiration-date> | |
| <updated-date>2011-06-06</updated-date> | |
| <status>clientRenewProhibited</status> | |
| </registrar-info> |
| require 'net/http' | |
| http = Net::HTTP.new('api.dominder.com') | |
| domain = 'google.com' | |
| email = 'your_email@your-email-server.com' | |
| authKey = 'your-authKey' | |
| format = 'xml' | |
| response = http.start do |http| | |
| request = Net::HTTP::Get.new("/v1/#{domain}?format=#{format}") | |
| request.basic_auth email, authKey |
| <?php | |
| $email = 'your_email@your-email-server.com'; | |
| $authKey = 'your-authKey'; | |
| $domain = 'google.com'; | |
| $api_url = 'http://api.dominder.com/v1/'; | |
| $format = 'xml'; | |
| $client = curl_init($api_url . $domain . '?format=' . $format); | |
| curl_setopt($client, CURLOPT_USERPWD, $email . ':' . $authKey); | |
| curl_setopt($client, CURLOPT_TIMEOUT, 30); |
| require 'resque' # include resque so we can configure it | |
| require 'yaml' | |
| require 'resque/failure/redis' | |
| require 'resque/failure/multiple' | |
| require 'resque/plugins/retry' | |
| require "resque-retry" | |
| Resque::Failure::MultipleWithRetrySuppression.classes = [Resque::Failure::Redis] | |
| Resque::Failure.backend = Resque::Failure::MultipleWithRetrySuppression | |
| Resque.redis = Redis.new(:host => 'localhost', :port => 6379) |
| curl --user 'username':'password' -o ~/delicious.xml 'https://api.del.icio.us/v1/posts/all' |