Skip to content

Instantly share code, notes, and snippets.

View ahmed1490's full-sized avatar

Ahmed Abbas ahmed1490

View GitHub Profile

Getting Balanced Payments up and running.

Files

  • balanced_controller.rb
  • _bank_account_form.html.haml
  • _credit_card_form.html.haml
  • bank_account_submission.js
  • credit_card_submission.js
@ahmed1490
ahmed1490 / JsTalk1.md
Last active October 15, 2017 14:39
Small JS talk by Aadit @ BS + some more info

Modules

  • Common js (sync loading using require('xyz.js')
  • AMD (async with dependent modules declaration)

Frontend/Browser

  • AMD eg: almond.js (stripped down of require.js)
  • Common Js not used on front end due to obvious reason.
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
green='\033[0;32m'
@ahmed1490
ahmed1490 / sublime-settings.md
Created December 21, 2015 17:49 — forked from MohamedAlaa/sublime-settings.md
Standard Sublime Settings Proposal

Problem we are trying to resolve

One of the Problems we face in any teams is that every one has his own sublime settings for spacing indentation which cause a problem when you push to git hub as some prefer using tabs for indentation and others using spacing.

Wrong Spacing and indentation example

The Objective

The objective is to standardize your sublime settings for readability and to avoid extra indentation or spaces after each line you write

@ahmed1490
ahmed1490 / .eslintignore
Last active February 16, 2016 09:46
ESlint (check first comment)
node_modules/**
dist/**
reports/**
@ahmed1490
ahmed1490 / .eslintrc
Last active March 10, 2016 10:04
ES List description
{
env: {
es6: true
},
parserOptions: {
sourceType: 'module',
ecmaVersion: 6,
ecmaFeatures: {
modules: true,
experimentalObjectRestSpread: true
http://www.dennyferra.com/setting-up-a-front-end-development-environment/
@ahmed1490
ahmed1490 / react-native-notes.md
Created July 12, 2016 18:48
Things I learned the hard way using React Native

Things I learned the hard way using React Native

Set up your environment carefully: It's important to have one canonical source of truth per environment, per platform. (i.e. iOS Development, iOS Testflight, iOS Production, ditto Android.) Every time you build, your config should propagate values from one input source (per platform) to either Java/JavaScript or Objective-C/JavaScript. Here's what we did for Android and here's what we did for iOS. I don't doubt that you can do better. Please do better. But you can't say that we didn't have one canonical source of truth that worked very simply and effectively throughout the development process.

Don't wait until the end to develop Android and iOS concurrently: Even if you're not actively focusing on both platforms, don't assume that "RN is cross platform… we can develop iOS and flip the Android switch when we'r

@ahmed1490
ahmed1490 / what-forces-layout.md
Created September 13, 2016 14:13 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@ahmed1490
ahmed1490 / promises.md
Created November 1, 2016 16:40 — forked from domenic/promises.md
You're Missing the Point of Promises

This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.

You're Missing the Point of Promises

Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:

getTweetsFor("domenic", function (err, results) {
 // the rest of your code goes here.