Skip to content

Instantly share code, notes, and snippets.

View kabircse's full-sized avatar

Kabir Hossain kabircse

  • Bangladesh
View GitHub Profile
@kabircse
kabircse / MY_Input.php
Last active August 29, 2015 14:17 — forked from phplaw/MY_Input.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class MY_Input extends CI_Input {
/**
* Variables
*
*/
protected $delete;
#!/usr/bin/env ruby
require 'rubygems'
require 'mysql2'
Mysql2::Client.default_query_options.merge!(:as => :array)
conn = Mysql2::Client.new(:host => 'localhost', :username => 'user',
:password => 'pw', :database => 'db')
tables = conn.query("SHOW TABLES").map {|row| row[0] }
@kabircse
kabircse / fiddle_079752.php
Last active August 29, 2015 14:26 — forked from phpfiddle/fiddle_079752.php
[ Posted by Non_zero ] This is the code for getting date differences in php.
<?php
echo 'For Yearly ::<br/>';
$cur_datetime = new DateTime();
echo '<br/>'.date('Y-m-d');
echo '<br/>';
$app_datetime = new DateTime("2014-08-02");
echo date('2014-08-02');
echo '<br/>';
$difference = $cur_datetime->diff($app_datetime);
echo '<br/>';
@kabircse
kabircse / bootstrap.css
Created October 19, 2015 09:29 — forked from Integralist/bootstrap.css
List of Twitter Bootstrap CSS classes
/*
* Scaffolding
* Basic and global styles for generating a grid system, structural layout, and page templates
* ------------------------------------------------------------------------------------------- */
.container
Sets a width of 940px which also centres the content (clears floated elements before/after)
.container-fluid
Sets a minimum width of 940px (clears floated elements before/after)
@kabircse
kabircse / redis-notes.rst
Created November 22, 2015 08:37 — forked from bradmontgomery/redis-notes.rst
Notes for my redis talk at the Memphis Super User Group meeting (hosted by the Memphis Java User Group).
@kabircse
kabircse / js.md
Created August 25, 2017 09:43 — forked from nuhil/js.md
Javascript Handbook

Javascript Handbook

A hand crafted markdown document contains all major Javascript topics covered, taken from different sources. Brush Up your JS memory.

Comments


Single line comments start with //. For multi-line commands, you use /* ... */

// This is a single line comment
@kabircse
kabircse / gzip-htaccess
Created December 14, 2017 04:19 — forked from Phlow/gzip-htaccess
enable gzip compression via .htaccess – Useful for WordPress and other sites
<IfModule mod_deflate.c>
# Komprimiere HTML, CSS, JavaScript, Text, XML und fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
<IfModule mod_deflate.c>
# Compress HTML, CSS, JavaScript, Text, XML and fonts
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/vnd.ms-fontobject
AddOutputFilterByType DEFLATE application/x-font
AddOutputFilterByType DEFLATE application/x-font-opentype
AddOutputFilterByType DEFLATE application/x-font-otf
AddOutputFilterByType DEFLATE application/x-font-truetype
AddOutputFilterByType DEFLATE application/x-font-ttf
@kabircse
kabircse / .htaccess
Created December 18, 2017 06:47 — forked from krybinski/.htaccess
.htaccess file for Laravel project
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
# Redirect non-www to www
RewriteCond %{HTTP_HOST} !^(.+)\.(.+)\.(.+)
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [L,R=301]
@kabircse
kabircse / install nodejs, npm and gulp
Created December 22, 2017 18:27 — forked from luisfc/install nodejs, npm and gulp
Install nodejs, npm and gulp ubuntu 16.04
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm
## Use n module from npm in order to upgrade node
sudo npm cache clean -f
sudo npm install -g n
sudo n stable