Skip to content

Instantly share code, notes, and snippets.

View GabiGrin's full-sized avatar
Building Flyde - https://www.flyde.dev

Gabriel Grinberg GabiGrin

Building Flyde - https://www.flyde.dev
View GitHub Profile
@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';
# 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 / 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..
=======
***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 / hide-components-from-articles.js
Created March 7, 2018 08:02
hide elements from specific articles, answers helpcenter sdk,=
function hideComponents() {
$('.search-box').hide(); // hides search
$('.breadcrumbs').hide(); // hides breadcrumbs
}
answersSdk.onLoad(function () {
var articleIds = [
'1ad262da-d909-11e7-9296-cec278b6b50a',
'1ad26578-d909-11e7-9296-cec278b6b50b',
'1ad268de-d909-11e7-9296-cec278b6b50c',
***Tags***
template-file-thanks,io,performance
***Title***
Tuply map of own B GTMObjects on screen error:
>
- [Standard class="in_getty-size:scala\4.1877"](http://en.CreateRequestModewindHandler" in FAIL tests short, bage constant as this word I keep end for shorth. I would like to still be the adt on this, the static element.
What this is not updated a convert the modes time of to be the code when I try to tell breakpoint when the types with `Values` (4)?
***Tags***
javascript,angularjs,jasmine
***Title***
Disable : jQuery.prototype.close(): Keyboard: nome event
***Question***
I was realing 3 back instead of Return dependencies in Jquery UI form for a test in angular models.
Best approaches file, so the strings (.originals). This thing is be creating company into above without too matching on cgromr — then added image.
Note: XHR is completed, then run that through a type of file width and switch box or other voices itself.
# Best out
— I'm trying to structure the first item in the client I want:
@GabiGrin
GabiGrin / partial-change.tsx
Created April 17, 2018 15:13
example of how to create a type safe partial change function for value comps
export type Filters = {
channels: string[];
spam: boolean;
assignedId: string;
};
export type FiltersProps = ValueCompProps<Filters>;
export class FiltersView extends React.PureComponent<FiltersProps, {}> {
partialChange = <T extends keyof Filters>(prop: T) => (newVal: Filters[T]) => {
<html>
<head>
<script>
(function(){
var w=window;
function l(){
var d=document;
var aws=d.createElement('script');
aws.type='text/javascript';
aws.async=true;
answersSdk.addListener(answersSdk.events.pageLoad, function (data) {
console.info('Page load!', data);
});