Skip to content

Instantly share code, notes, and snippets.

View avastamin's full-sized avatar

Ruhul Amin avastamin

View GitHub Profile

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@avastamin
avastamin / README.md
Created February 15, 2018 12:22 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@avastamin
avastamin / IndexedDB101.js
Created January 7, 2018 18:09 — forked from JamesMessinger/IndexedDB101.js
Very Simple IndexedDB Example
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB;
// Open (or create) the database
var open = indexedDB.open("MyDatabase", 1);
// Create the schema
open.onupgradeneeded = function() {
var db = open.result;
var store = db.createObjectStore("MyObjectStore", {keyPath: "id"});
@avastamin
avastamin / braking.md
Created December 11, 2017 08:50
Fahrschule
@avastamin
avastamin / pardot-form-handler-iframe.html
Created October 10, 2017 13:57 — forked from afischoff/pardot-form-handler-iframe.html
Example of using a hidden iframe to pass data to a Pardot form handler before continuing with normal form submission.
<html>
<head>
<title>Pardot Example Form Handler Submit</title>
<!-- Include jQuery -->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<!-- Post to Pardot function -->
<script type="text/javascript">
// set the pardot form handler url and form element id
@avastamin
avastamin / gist:fcf434c457e70d651e3b7713a3879a1c
Created July 27, 2016 07:04 — forked from Mithrandir0x/gist:3639232
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"