Skip to content

Instantly share code, notes, and snippets.

Why do we even have this here?

Rifat Nabi torifat

Why do we even have this here?
View GitHub Profile
View machine.js
const extensionMachine = Machine({
id: 'extension',
initial: 'loading',
context: {
retries: 0
states: {
loading: {
on: {
LOAD_MANIFEST: 'manifestOnly',
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script id="jsbin-javascript">
document.addEventListener('paste', e => {
torifat /
Created Dec 18, 2016 — forked from piscisaureus/
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

torifat / __helpers.js
Created Dec 5, 2016
Jest toMatchObject
View __helpers.js
// @flow
const {
} = require('jest-matcher-utils');
torifat / xterm-256color.svg
Created Sep 22, 2016 — forked from jasonm23/xterm-256color.svg
Xterm 256color mode color chart, organised into sections.
View xterm-256color.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
torifat / .flowconfig
Created Aug 4, 2016
Default .flowconfig for create-react-app
View .flowconfig
module.name_mapper='^\(.*\)\.css$' -> 'react-scripts/config/flow/css'
module.name_mapper='^\(.*\)\.\(jpg\|png\|gif\|eot\|svg\|ttf\|woff\|woff2\|mp4\|webm\)$' -> 'react-scripts/config/flow/file'
torifat / 000logdna.config
Created Jun 16, 2016 — forked from avnersorek/000logdna.config
AWS Elastic Beanstalk configuration script for forwarding logs to LogDNA
View 000logdna.config
# Place this file in the .ebextensions folder of your project
"/home/ec2-user/" :
mode: "000777"
owner: root
group: root
content: |
echo "[logdna]
name=LogDNA packages
torifat / class-property-semicolon.js
Last active Jan 29, 2016
$ jscodeshift -t ../codemod/static-property-semicolon.js src/
View class-property-semicolon.js
export default function(file, api) {
const j = api.jscodeshift;
const { expression, statement, statements } = j.template;
return j(file.source)
.replaceWith(p => {
return p.node;

Keybase proof

I hereby claim:

  • I am torifat on github.
  • I am rifat ( on keybase.
  • I have a public key whose fingerprint is 8358 0103 6662 7E4A 5110 3E3A 797E 605D 41E5 033A

To claim this, I am signing this object:

View gist:8ff784c7ff52ff6c4822

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).