Skip to content

Instantly share code, notes, and snippets.

View thesabbir's full-sized avatar

Sabbir Ahmed thesabbir

View GitHub Profile
@thesabbir
thesabbir / Gulpfile.js
Created January 20, 2015 17:32
Gulpfile for imdhaka project
'use strict';
var gulp = require('gulp'),
$ = require('gulp-load-plugins')();
$.fs = require('fs');
$.sync = require('browser-sync');
$.run = require('run-sequence');
$.del = require('del');
$.merge = require('merge-stream');
@thesabbir
thesabbir / infinity.js
Created January 25, 2015 21:55
Infinite Scrolling
var lastPos = 0;
var scrolling = $('#scrolling-item');
scrolling.on('scroll', function () {
var height = scrolling.height();
var scrollHeight = scrolling[0].scrollHeight;
var scrollTop = scrolling.scrollTop()+1;
if (lastPos < scrollTop) {
if (scrollTop >= scrollHeight - height) {
console.log('Loading..');
}
/**
* AuthController
*
* @description :: Server-side logic for managing auths
* @help :: See http://links.sailsjs.org/docs/controllers
*/
module.exports = {
index: function (req, res) {
var email = req.param('email');
@thesabbir
thesabbir / CallApply.js
Created May 5, 2015 22:56
How to use .call() and .apply()
/* CallApply.js
* How to use .call() and .apply()
* Author : Sabbir Ahmed
* Mail : <mail[at]thesabbir.com>
* Date : 6-May-2015
*/
// Lets create a User Object
var User = function(name, age){
/**
* Created by sabbir on 5/7/15.
* Config for Elaach server
*/
var base = 'http://elaach.com';
var baseMovie = base + '/index.php/movie';
module.exports.config = {
base : base,
@thesabbir
thesabbir / travis.yml
Last active September 20, 2017 00:57
Cordova CI
language: android
android:
components:
- build-tools-22.0.1 # Specify your build tools verison
- android-22 # Android Platform Target
env: # Envirement Variables
global:
before_install:
# Commands to excecute before install
- echo "Before install stage"
{
"private": true,
"engines": {
"node": ">=0.10.0"
},
"scripts" : {
"test" : "./.bin/gulp test",
"build" : "./.bin/cordova build android",
"postinstall": "./.bin/bower install && ./.bin/cordova prepare"
},
<%#
LuCI - Lua Configuration Interface
Copyright 2008 Steven Barth <[email protected]>
Copyright 2008-2011 Jo-Philipp Wich <[email protected]>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@thesabbir
thesabbir / config.json
Created September 12, 2015 10:21 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@thesabbir
thesabbir / CSS3 Media Queries Template
Last active September 14, 2015 17:39
CSS3 Media Queries template
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}