Skip to content

Instantly share code, notes, and snippets.

View mnishihan's full-sized avatar

M N Islam Shihan mnishihan

  • Dhaka, Bangladesh
View GitHub Profile
@mnishihan
mnishihan / example.html
Created July 29, 2012 21:03 — forked from joelnet/example.html
Unobtrusive Knockout support library for jQuery
Choose a ticket class: <select id="tickets"></select>
<p id="ticketOutput"></p>
<script id="ticketTemplate" type="text/x-jquery-tmpl">
{{if chosenTicket}}
You have chosen <b>${ chosenTicket().name }</b>
($${ chosenTicket().price })
<button data-bind="click: resetTicket">Clear</button>
{{/if}}
@mnishihan
mnishihan / ide_helper.php
Created August 2, 2012 23:47
[LARAVEL] Laravel3 IDE Helper
<?php
class Auth extends Laravel\Auth {}
/**
* @method static add(string $name, string $source, array $dependencies = array(), array $attributes = array())
* @method static string styles()
* @method static string scripts()
*/
class Asset extends Laravel\Asset {}
@mnishihan
mnishihan / example.html
Created September 14, 2012 19:46 — forked from joelnet/example.html
Unobtrusive Knockout support library for jQuery
Choose a ticket class: <select id="tickets"></select>
<p id="ticketOutput"></p>
<script id="ticketTemplate" type="text/x-jquery-tmpl">
{{if chosenTicket}}
You have chosen <b>${ chosenTicket().name }</b>
($${ chosenTicket().price })
<button data-bind="click: resetTicket">Clear</button>
{{/if}}
@mnishihan
mnishihan / sublime_text_2_useful_shortcuts.md
Created October 24, 2012 20:43 — forked from nuxlli/sublime_text_2_useful_shortcuts.md
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@mnishihan
mnishihan / gist:3955864
Created October 25, 2012 22:27
JavaScript: Sexy PubSub
// Works in modern browsers + IE9, but Modernizr has a polyfill baked in for function.bind.
// Hat tip Paul Irish
var o = $( {} );
$.subscribe = o.on.bind(o);
$.unsubscribe = o.off.bind(o);
$.publish = o.trigger.bind(o);
@mnishihan
mnishihan / errors.php
Created October 25, 2012 22:27
PHP: Display Errors
error_reporting(E_ALL);
ini_set('display_errors', '1');
@mnishihan
mnishihan / gist:3955873
Created October 25, 2012 22:28
CSS: Image Replacement
.ir {
border:0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@mnishihan
mnishihan / gist:3955963
Created October 25, 2012 22:50
JavaScript: Library Agnostic Pub/Sub
App = {};
App.cache = {};
App.publish = function(topic, args){
App.cache[topic] && $.each(App.cache[topic], function(){
this.apply($, args || []);
});
};
App.subscribe = function(topic, callback){
if(!App.cache[topic]){
App.cache[topic] = [];
#!/usr/bin/php
<?php
error_reporting(E_ALL);
if (count($argv) <= 1) {
print("usage createMockup src_dir dst_dir images_dir\n");
print("\tsrc_dir : dir where all bmml file are\n");
print("\tdst_dir : dir where write all html files\n");
print("\timages_dir : dir where all export mockup png are (will be copied to the \$dst_dir/images directory)\n");
exit(1);
}
@mnishihan
mnishihan / awesome-php.md
Last active December 11, 2015 10:38 — forked from ziadoz/awesome-php.md

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).