This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON("package.json"), | |
coffee: { | |
options: { | |
bare: true | |
}, | |
glob_to_multiple: { | |
expand: true, | |
flatten: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Check and verify user status or prompt for authorization | |
function checkUserStatus(response) { | |
var permissions = { | |
scope: '' // email | |
}; | |
if ( isConnectedUser(response) ) | |
return FB.api('/me', gotUserInfo); | |
return FB.login(checkUserStatus, permissions); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// setup | |
!(function(root) { | |
var AsyncGoogleMap = (function() { | |
// constructor | |
function AsyncGoogleMap(canvas, lat, lng, zoom, callback) { | |
if ( typeof canvas === 'undefined' ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
This is code for working example of vanilla JavaScript Bootstrap | |
script at: https://gist.github.com/jabranr/254f6b47dd765ac50654 | |
Copy this all code and save as an HTML file to see the demo. | |
--> | |
<!doctype HTML> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* This is small, light weight vanilla JavaScript Bootstrap script. | |
* | |
* It comes handy in situations where a framework i.e. jQuery is used only | |
* for "load" and "ready" events etc. This small script will not only save | |
* lot of bytes but also gives a basic start on writing object literal JavaScript. | |
* | |
* Learn more about object literal JavaScript at following resource: | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Values,_variables,_and_literals | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Use the script at root directory of all Git projects. | |
# | |
# How it works: | |
# 1. The script will change directory to each sub directory. | |
# 2. Checks for ".git/" directory. Fails and returns message if not found. | |
# 3. In valid Git project, it Fetches and Pulls the updates from remote. | |
# 4. Shows end result message accordingly. | |
# | |
# Author: Jabran Rafique <hello@jabran.me> | |
# License: MIT License |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head></head> | |
<body> | |
<div class="tooltip"> | |
<div class="tikon"></div> | |
<div class="tiptext">This is the longest ever tooltip you might have seen in whole world wide web.</div> | |
</div> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Delete a Git branch locally and remotely | |
# Author: Jabran Rafique <hello@jabran.me> | |
# License: MIT License | |
#!/bin/bash | |
# Display all local branches | |
git branch | |
# Delete a local branch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"debug_layout" : { | |
"cols": [0.0, 0.5, 1.0], | |
"rows": [0.0, 0.6, 1.0], | |
"cells": [[0, 0, 2, 1], [0, 1, 1, 2], [1, 1, 2, 2]] | |
}, | |
"close_on_stop": true, | |
"super_globals": true, | |
"break_on_start": false, | |
"debug": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["f4"], "command": "import_namespace" }, | |
{ "keys": ["f7"], "command": "insert_php_constructor_property" }, | |
{ "keys": ["f9"], "command": "expand_fqcn" }, | |
{ "keys": ["f10"], "command": "find_use" }, | |
{ "keys": ["shift+f9"], "command": "expand_fqcn", "args": {"leading_separator": true} }, | |
{ "keys": ["shift+f12"], "command": "goto_definition_scope" } | |
] |
OlderNewer