Skip to content

Instantly share code, notes, and snippets.

Turadg Aleahmad turadg

Block or report user

Report or block turadg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
turadg /
Created Dec 8, 2017
Find in webpack builds modules that are never imported
echo "Testing prod build for modules in src that aren't ever imported."
echo "NOTE: Any dev-only imports will appear to be unused."
turadg / silence-React-15-deprecations.js
Last active Apr 13, 2018
Jest setup file to stop React 15.5 createClass / PropTypes deprecation warnings
View silence-React-15-deprecations.js
import React from 'react';
* Since React v15.5, there's a warning printed if you access `React.createClass` or `React.PropTypes`
* `import * as React from 'react'` is required by Flowtype ,
* but the * causes both those deprecated getters to be called.
* This is particularly annoying in Jest since every test prints two useless warnings.
turadg / generateFlowModuleNameMappers.js
Last active Jun 20, 2018
Helper to create .flowconfig module name mapper
View generateFlowModuleNameMappers.js
#!/usr/bin/env node
* Flowtype understands Node (or Haste) imports but not Webpack.
* Many codebases have webpack set up like:
* src/foo.js
* src/components/Bar.jsx
* And then import them like `require('foo')` or `require/components/Bar.jsx`
turadg / swaggerTable.js
Created Jan 3, 2017
Generate a tab delimited table of endpoints on a Swagger-described API
View swaggerTable.js
#!/usr/bin/env node
For Swagger 1.2 docs format.
Hardcode the base path in the urlFor() function.
Assumes Node 6+.
# Retroflow
# This makes it easier to retrofit Flow type checking onto your existing code.
# Given a path argument, it finds all the js/jsx files under that path that
# don't have the Flow ( preamble. It then adds it and runs the
# Flow check. If anything fails, it removes it again.
View codecov
# fork of
set -e +o pipefail

Keybase proof

I hereby claim:

  • I am turadg on github.
  • I am turadg ( on keybase.
  • I have a public key whose fingerprint is 1AAF D87D B5DB 6B87 29A5 7646 0249 C9F5 1B7F 02C2

To claim this, I am signing this object:

View navigateActionExample.js
* The router runs this navigate action once a new route is resolved.
* This returns a promise that must be satisfied before the render
* starts. The promise consists of all actions that each handler
* in the route declares that it needs before navigating.
* WHEN we upgrade react-router to 1.0, we should revisit this design
* @return {Promise} to satisfy all the dependencies of the route
turadg /
Created Apr 1, 2015
Retracked draft

Retracked wraps your event recording system in an API optimized for React components.



Somewhere early in execution:

# set the recording function
View designer.html
<link rel="import" href="../chart-js/chart-js.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/iconsets/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../paper-checkbox/paper-checkbox.html">
<polymer-element name="my-element">
You can’t perform that action at this time.