Skip to content

Instantly share code, notes, and snippets.

View rakibulalam's full-sized avatar

rakibulalam rakibulalam

View GitHub Profile
@rakibulalam
rakibulalam / README
Created October 14, 2017 00:40 — forked from joelambert/README
Drop in replacements for setTimeout()/setInterval() that makes use of requestAnimationFrame() where possible for better performance
Drop in replace functions for setTimeout() & setInterval() that
make use of requestAnimationFrame() for performance where available
http://www.joelambert.co.uk
Copyright 2011, Joe Lambert.
Free to use under the MIT license.
http://www.opensource.org/licenses/mit-license.php
@rakibulalam
rakibulalam / sql-mongo_comparison.md
Created September 12, 2017 20:21 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@rakibulalam
rakibulalam / Schema.JS
Created August 29, 2017 00:41
Schema validation ES6
// object validation rules
const schema = {
first: {
required:true
},
last: {
required:true
}
}
@rakibulalam
rakibulalam / _autobind.es6
Last active December 1, 2018 17:30
ES6 Auto Bind !!
/*bind your all method autometically in your class*/
/*Author: Md. Rakibulalam , <[email protected]> (http://rakibulalam.info)*/
/*
constructor(){
this._autobind();
}
*/
_autobind(){
Reflect.ownKeys(Reflect.getPrototypeOf(this)).forEach((m)=>{
if(typeof this[m]==='function' && (m!=='_autobind' || m!=='constructor'))
@rakibulalam
rakibulalam / Singleton.js
Last active May 8, 2018 18:09
Singleton Pattern in ES6
let instance;
// define instance variaible out of the scope.
export default class Single{
constructor()
{
if(!instance) // if its not defined.
{
instance=this; // let it to be filled.
}
@rakibulalam
rakibulalam / meteor.cheatsheet.coffee
Created April 26, 2017 11:45 — forked from LeCoupa/meteor.cheatsheet.coffee
Meteor Cheatsheet: Meteor Core, Publish and Subscribe, Method, Server Connections, Collections, Session, Accounts, Passwords, Templates, Match, Timers, Deps, EJSON, HTTP, Email, Assets, Command Line. More: http://journal.gentlenode.com/meteor-5-cheatsheet/
# METEOR CORE:
Anywhere: Meteor.isClient
Anywhere: Meteor.isServer
Anywhere: Meteor.startup(func)
Anywhere: Meteor.absoluteUrl([path], [options])
Anywhere: Meteor.settings
Anywhere: Meteor.release
@rakibulalam
rakibulalam / ReactHeightWidth.jsx
Last active April 18, 2017 18:58
React Window height width
export default class home extends React.Component{
constructor(props) {
super(props);
this.state = { width: '0', height: '0' };
this.updateWindowDimensions = this.updateWindowDimensions.bind(this);
}
componentDidMount() {
this.updateWindowDimensions();
@rakibulalam
rakibulalam / ReactFlowRouter.jsx
Last active April 18, 2017 12:06
ReactLayout for Meteor flow Router.
/*
add meteor npm --save react, react-dom, flow-router, react-layout
*/
import React from 'react';
import { Meteor } from 'meteor/meteor';
import { render } from 'react-dom';
/*
keep all ui imports/ui
*/