Skip to content

Instantly share code, notes, and snippets.

@mottaquikarim
mottaquikarim / .vimrc
Created June 15, 2015 14:48
Taq's .vimrc @honey
set ruler
set cursorline
call pathogen#infect()
syntax on
syntax enable
set tabstop=4
set shiftwidth=4
set expandtab
@mottaquikarim
mottaquikarim / .vimrc
Created December 15, 2014 06:18
simple .vimrc -- the one I use for my personal projects server
set ruler
set cursorline
call pathogen#infect()
syntax on
syntax enable
set backspace=2
set autoindent
set number
@mottaquikarim
mottaquikarim / SingletonMediator.js
Created December 14, 2014 16:40
Singleton Mediator
;define([
"jquery"
, "/path/to/module1"
, "/path/to/module2"
]
, function( $, mod1, mod2 ) {
var Singleton = (function() {
// internal reference to the singleton
var instance;
// internal mod refs
@mottaquikarim
mottaquikarim / singleton.js
Created December 14, 2014 16:37
Singleton boilerplate
;define([
"jquery"
]
, function( $ ) {
var Singleton = (function() {
// internal reference to the singleton
var instance;
function init() {
function publicMeth() {
@mottaquikarim
mottaquikarim / main.js
Created December 14, 2014 16:31
jQueryUI Widget Factory Boiler Plate with RequireJS
require.config(
{
paths: {
'jquery' : 'libs/jquery-1.11.1.min'
, 'jqueryUI' : 'libs/jquery-ui-1.11.2.min'
}
, shim: {
'jqueryUI' : [ 'jquery' ]
}
}
@mottaquikarim
mottaquikarim / exampleWidget.js
Created December 14, 2014 16:27
jQueryUI Widget Factory Boiler Plate
// basic example here
(function( ) { // protect the lemmings!
var _myPlugin = {
_create: function() {
// this function will get called everytime
// your widget is run
var self = this;
self._callSomePrivateMethod();
@mottaquikarim
mottaquikarim / index.html
Created December 14, 2014 16:12
RequireJS setup
require.config(
{
paths: {
'jquery' : 'libs/jquery-1.11.1.min'
, 'jqueryUI' : 'libs/jquery-ui-1.11.2.min'
}
, shim: {
'jqueryUI' : [ 'jquery' ]
}
}
@mottaquikarim
mottaquikarim / main.css
Created September 8, 2014 22:01
sticky footer example
/* set the body to be full height of window */
html, body {
height: 100%;
}
body {
min-height: 100%;
}
/* set box sizing on content-wrapper (because there's a padding bottom) */
.content_wrapper {
@mottaquikarim
mottaquikarim / logo.html.partial
Created September 4, 2014 14:18
GA logo, with CSS3 animations
<div class="loader--wrapper">
<div class="loader--loading">
<div class="loader--bottom-layer">
<img src="assets/ga_full.png">
<div class="loader--mask"></div>
</div>
<div class="loader--top-layer">
<img src="assets/ga_meat.png">
</div>
</div>
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,