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
async function chargeCreate ({ amount, source, description, currency }) { | |
//do some stuff before the function | |
await someService.doAsyncStuff(amount, currency, description); | |
try { | |
const charge = await stripe.charges.create.apply(stripe.charges, arguments); | |
//do some stuff after the function | |
myTraceService.log(`New charge ${charge.amount}`); | |
return charge; | |
} catch (e) { | |
// do something with the error if you want to |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle' | |
}); |
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
TL;DR - jump to the challenge at the end | |
====ON BLOCKING EVIL BOTS===== | |
On a resent job interview I had for "Incapsula" a few days ago I was put to the challenge to break | |
their bot protection mechanism. Apparently node.js is not that common among bot writes and most bots | |
are not able to run javascript. | |
The challenge had two parts - | |
1. find what the code does. | |
2. implement a bot that will break the code without using js. | |
3. think how to make this code unbreakable |