Skip to content

Instantly share code, notes, and snippets.

View ragmha's full-sized avatar

Räghib Hasan ragmha

View GitHub Profile
@ragmha
ragmha / index.html
Created April 26, 2016 02:28 — forked from anonymous/index.html
Learning Redux - Part 1
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.5.2/redux.min.js"></script>
<script src="https://wzrd.in/standalone/expect@latest"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@ragmha
ragmha / index.html
Last active April 26, 2016 02:39 — forked from anonymous/index.html
Learning Redux part -2
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.3.1/redux.js"></script>
<script src="https://wzrd.in/standalone/expect@latest"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@ragmha
ragmha / index.html
Created April 26, 2016 02:47 — forked from anonymous/index.html
Learning redux part-3
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.3.1/redux.js"></script>
<script src="https://wzrd.in/standalone/expect@latest"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@ragmha
ragmha / index.html
Created April 26, 2016 02:59 — forked from anonymous/index.html
Learning redux part-4
<!DOCTYPE html>
<html>
<head>
<script src="https://fb.me/react-with-addons-0.14.7.min.js"></script>
<script src="https://fb.me/react-dom-0.14.7.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.3.1/redux.js"></script>
<script src="https://wzrd.in/standalone/expect@latest"></script>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
@ragmha
ragmha / index.html
Created April 26, 2016 03:30 — forked from anonymous/index.html
Learning redux part-5
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/detectizr/1.5.0/detectizr.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://wzrd.in/standalone/expect@latest"></script>
<script src="https://wzrd.in/standalone/deep-freeze@latest"></script>
</head>
@ragmha
ragmha / index.html
Last active April 26, 2016 03:39 — forked from anonymous/index.html
Learning redux part-6
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://wzrd.in/standalone/expect@latest"></script>
<script src="https://wzrd.in/standalone/deep-freeze@latest"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@ragmha
ragmha / Readme.md
Created August 9, 2016 23:28 — forked from mxstbr/Readme.md
Enable tab completion for JSX with Emmet in Atom

Enable tab completion for JSX with Emmet in Atom

This guide assumes you have the emmet and language-babel packages already installed in Atom

Gif of the tab completion working

  1. Open the keymap.cson file by clicking on Atom -> Keymap… in the menu bar
  2. Add these lines of code to your keymap:
'atom-text-editor[data-grammar~="jsx"]:not([mini])':
@ragmha
ragmha / destructuring.js
Created August 12, 2016 12:27 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring. Runnable demos and slides about the same topic: http://git.mikaelb.net/presentations/bartjs/destructuring
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => {
return [1, 2, 3];
@ragmha
ragmha / philosophers.js
Created January 6, 2017 14:10 — forked from sheremetyev/philosophers.js
Dining Philosophers in JavaScript
// Dining Philosophers problem
function Phil(me, left, right) {
var run = function() {
sequential([
500, // pause
function() { console.log(me + ' sits'); },
left, // channel
function() { console.log(me + ' picked left fork'); },
500,