Skip to content

Instantly share code, notes, and snippets.

View GabiGrin's full-sized avatar

Gabriel Grinberg GabiGrin

View GitHub Profile
=======
***Tags***
java,html,coding
***Title***
Not to considect one file, then what the code of <keyMinActivrended.GetModeTransage>
> holdery (there is no what:
> WM of MALLEREENBC XXXXXXX ($erf[warn][2])
@GabiGrin
GabiGrin / answers-webhook-signed-request.js
Created April 3, 2016 12:37
Answers Webhook Signed request
var apiKey = 'YOUR KEY HERE';
var secret = 'YOUR SECRET HERE';
var crypto = require('crypto');
var requestify = require('requestify');
function signedPost (url, data) {
var signer = cryto.createHmac('sha256', new Buffer(secret, 'utf8'));
var jsonData = unescape(encodeURIComponent(JSON.stringify(data)));
var signature = signer.update(jsonData).digest('hex');
return requestify.post(url, data, { //I used requestify, but any other method for doing cross-server requests is valid, the only thing that matters are the headers..
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
@GabiGrin
GabiGrin / migrate-ts-to-es6-modules.js
Created July 27, 2015 12:00
migrate typescript using commonjs module syntax to es6 modules sytax
//run "npm install glob chalk" before running this
'use strict';
/*global console*/
var glob = require('glob');
var fs = require('fs');
var chalk = require('chalk');
var pattern = '{src,e2e}/**/*.ts';
// var pattern = 'src/reply.i.ts';