I hereby claim:
- I am joshleaves on github.
- I am redleaves (https://keybase.io/redleaves) on keybase.
- I have a public key whose fingerprint is 4444 68FD 668F 20DE 4046 1DD2 0831 CF3F BE3A 6E84
To claim this, I am signing this object:
2.2.0 :001 > opts = { | |
2.2.0 :002 > body: { | |
2.2.0 :003 > references: [ | |
2.2.0 :004 > { item_id: 1, item_type: 'Part', code: 'IP5-SCREEN', gem_code: '1-UPTO-13' }, | |
2.2.0 :005 > { item_id: 1, item_type: 'Accessory', code: 'SELFIE-FU', gem_code: '13-NUMBERS' } | |
2.2.0 :006?> ] | |
2.2.0 :007?> } | |
2.2.0 :008?> } | |
=> {:body=>{:references=>[{:item_id=>1, :item_type=>"Part", :code=>"IP5-SCREEN", :gem_code=>"1-UPTO-13"}, {:item_id=>1, :item_type=>"Accessory", :code=>"SELFIE-FU", :gem_code=>"13-NUMBERS"}]}} | |
2.2.0 :009 > opts.to_query |
compdef () { | |
local opt autol type func delete eval new i ret=0 cmd svc | |
local -a match mbegin mend | |
emulate -L zsh | |
setopt extendedglob | |
if (( ! $# )) | |
then | |
print -u2 "$0: I need arguments" | |
return 1 | |
fi |
if Rails.env.development? | |
Rails.application.assets.logger = Logger.new('/dev/null') | |
Rails::Rack::Logger.class_eval do | |
def call_with_quiet_assets(env) | |
previous_level = Rails.logger.level | |
Rails.logger.level = Logger::ERROR if env['PATH_INFO'] =~ %r{^/assets/} | |
call_without_quiet_assets(env) | |
ensure | |
Rails.logger.level = previous_level | |
end |
I hereby claim:
To claim this, I am signing this object:
var jude = 'jude'; | |
var yeah = 'yeah'; | |
var hey = 'hey'; | |
var sixjude = [ jude, jude, jude, jude, jude, jude ]; | |
var sixyeah = [ yeah, yeah, yeah, yeah, yeah, yeah ]; | |
console.log(yeah); | |
console.log(sixjude.map(parseInt).join() + '(' + sixyeah.join() + ')'); | |
console.log(sixjude.map(parseInt).join() + hey + jude); |
You should have your api keyset (two keys) ready. If not, generate them. These tokens are tied to your account, and thus, to your identity. Like all API keys, these are of course NON-TRANSFERABLE and should never be communicated to third-parties (and I won't call you and ask them either).
With these two keys in hand, you'll then need a request. Let's just issue a PUT on /users/test_user with "github=testgithub". In curl this should look like this:
$ curl -X PUT -d "github=testgithub" http://api.techshaker.com/users/test_user
Well, not really, we also need to authenticate. Authentification is done by adding your API_KEY ("the short one") to the headers as "X-API-KEY". Like this:
$ curl -X PUT -H "X-API-KEY: YOUR-API-KEY" -d "github=testgithub" http://api.techshaker.com/users/test_user
(function () { | |
module.exports = function (req, res, next) { | |
res.header('X-Powered-By', 'Programmers on drugs'); | |
return next(); | |
} | |
})(); |
var ga = require('node-ga')('UA-XXXXXXXX-Y', { safe: true}); | |
/* your usual express options */ | |
app.get('/logged-route', ga, LoggedRouteHandler); | |
app.get('/non-logged-route', NonLoggedRouteHandler); |
var d = 0; | |
var stack = []; | |
var LOG = console.log; | |
Function.prototype.callMe = Function.prototype.call; | |
Function.prototype.call = function () { | |
var depth = ''; | |
for (var i = 0; i < d; ++i) { depth = depth + ' '; }; | |
++d; | |
LOG('>>' + arguments.callee.caller.name); | |
stack.push(depth + '>> ' + arguments.callee.caller.name); |
/* | |
// Will only throw on missing leading '/' | |
*/ | |
JSON.pointer = function (object, pointer) { | |
if ('undefined' === typeof object || 'undefined' === typeof pointer || '/' === pointer) { | |
return object; | |
} | |
if ('/' !== pointer.substr(0, 1)) { | |
throw new SyntaxError('Unexpected character ' + pointer.substr(0, 1)); | |
} |