Skip to content

Instantly share code, notes, and snippets.

View ragmha's full-sized avatar

Räghib Hasan ragmha

View GitHub Profile
@ragmha
ragmha / atom_clojure_setup.md
Created February 5, 2017 23:07 — forked from jasongilman/atom_clojure_setup.md
This describes how I setup Atom for Clojure Development.

Atom Clojure Setup

This describes how I setup Atom for an ideal Clojure development workflow. This fixes indentation on newlines, handles parentheses, etc. The keybinding settings for enter (in keymap.cson) are important to get proper newlines with indentation at the right level. There are other helpers in init.coffee and keymap.cson that are useful for cutting, copying, pasting, deleting, and indenting Lisp expressions.

Install Atom

Download Atom

The Atom documentation is excellent. It's highly worth reading the flight manual.

@ragmha
ragmha / 0Option2ConstructorSummary.md
Created February 4, 2017 07:32 — forked from allenwb/0Option2ConstructorSummary.md
New ES6 constructor features and semantics: Alternative 2 manual super in derived classes

New ES6 Constructor Semantics and Usage Examples

Manual super: Alternative Design where subclass constructors do not automatically call superclass constructors

This Gist presents a new design of class-based object construction in ES6 that does not require use of the two-phase @@create protocol.

One of the characteristics of this proposal is that subclass constructors must explicitly super invoke their superclass's constructor if they wish to use the base class' object allocation and initialization logic.

An alternative version of this design automatically invokes the base constructor in most situations.

@ragmha
ragmha / index.html
Created January 12, 2017 00:18 — forked from anonymous/index.html
JS Bin // source https://jsbin.com/vewoju
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<script src="https://fb.me/react-0.14.7.js"> </script>
<script src="https://fb.me/react-dom-0.14.7.js"></script>
<script src="https://unpkg.com/expect/umd/expect.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/redux/3.3.1/redux.js"></script>
</head>
@ragmha
ragmha / index.html
Created January 10, 2017 11:58 — forked from anonymous/index.html
Cat Clicker :D
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
h1 {
text-align: center;
}
@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,
@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 / 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])':
<!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 / 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>
@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>