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
// Unicode to 7-bit GSM | |
var write = "Hello, Faisalman!"; | |
var msgSubmit = ""; | |
write.split('').forEach(function(i) { | |
msgSubmit += parseInt(Unicode2GSM[i], 10).toString(16).toUpperCase() + " "; | |
}); | |
console.log(msgSubmit); // "48 65 6C 6C 6F 2C 20 46 61 69 73 61 6C 6D 61 6E 21 " | |
// 7-bit GSM to Unicode | |
var read = "48 65 6C 6C 6F 2C 20 46 61 69 73 61 6C 6D 61 6E 21 "; |
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
/** | |
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
(function(){ |
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 | |
/** | |
* Get ISO-8601 week number for a given date | |
* | |
* @author Faisalman <fyzlman@gmail.com> | |
* @link http://gist.github.com/faisalman | |
* @link http://en.wikipedia.org/wiki/ISO_week_date | |
* @param $y int year | |
* @param $m int month | |
* @param $d int day |
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
/** | |
* Calculate Age in C# | |
* https://gist.github.com/faisalman | |
* | |
* Copyright 2012-2013, Faisalman <fyzlman@gmail.com> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ | |
using System; |
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
<!-- | |
1. Google +1 button | |
- see http://www.google.com/webmasters/+1/button/ | |
--> | |
<g:plusone size="medium"></g:plusone> | |
<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script> | |
<!-- | |
2. Twitter Tweet button | |
- see http://twitter.com/about/resources/tweetbutton/ |
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
/** | |
* Regular Expression snippets to validate Google Analytics tracking code | |
* see http://code.google.com/apis/analytics/docs/concepts/gaConceptsAccounts.html#webProperty | |
* | |
* @author Faisalman <movedpixel@gmail.com> | |
* @license http://www.opensource.org/licenses/mit-license.php | |
* @link http://gist.github.com/faisalman | |
* @param str string to be validated | |
* @return Boolean | |
*/ |
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-like print_r() equivalent for JavaScript Object | |
* | |
* @author Faisalman <fyzlman@gmail.com> | |
* @license http://www.opensource.org/licenses/mit-license.php | |
* @link http://gist.github.com/879208 | |
*/ | |
var print_r = function (obj, t) { | |
// define tab spacing |
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 | |
/** | |
* Excel 2003 XML-Parser | |
* | |
* PHP library for parsing Microsoft Excel 2003 XML Spreadsheet | |
* http://gist.github.com/862741 | |
* | |
* Copyright (c) 2011 Faisalman <movedpixel@gmail.com> | |
* |
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
package | |
{ | |
/** | |
* ActionScript 3.0 Code Snippet | |
* Convert Number to Rupiah & vice versa | |
* https://gist.github.com/845309 | |
* | |
* Copyright 2011-2012, Faisalman | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license |