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
<?php | |
/** | |
* Converts the integer to binary and outputs list of integers that are power of 2 | |
* | |
* @author: Jabran Rafique <hello@jabran.me> | |
* @param: integer $decimal | |
* @return: string | |
*/ | |
function get_special_binary( $decimal ) { |
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({ | |
sass: { | |
compile: { | |
options: { | |
style: 'compressed' | |
}, | |
files: { | |
'styles/screen.css': 'styles/screen.scss' |
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
// 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
// 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); | |
} |
NewerOlder