Skip to content

Instantly share code, notes, and snippets.

View FayazK's full-sized avatar
🎯
Focusing

Fayaz Khan FayazK

🎯
Focusing
View GitHub Profile
<!-- Better Table Template for HTML5 http://perishablepress.com/html5-table-template/#html5table -->
<table>
<caption>Here we assign header information to cells
by setting the scope attribute.
</caption>
<colgroup />
<colgroup span="2" title="title" />
<thead>
<tr>
<th scope="col">Name</th>
@FayazK
FayazK / GitHub User Card.markdown
Last active October 26, 2018 06:51
GitHub User Card
/**
* author Remy Sharp
* url http://remysharp.com/tag/marquee
*/
(function ($) {
$.fn.marquee = function (klass) {
var newMarquee = [],
last = this.length;
@FayazK
FayazK / find-replace-dom.js
Created February 20, 2017 17:37
FInd & Replace in DOM using JavaScript
function findAndReplace(searchText, replacement, searchNode) {
if (!searchText || typeof replacement === 'undefined') {
// Throw error here if you want...
return;
}
var regex = typeof searchText === 'string' ?
new RegExp(searchText, 'g') : searchText,
childNodes = (searchNode || document.body).childNodes,
cnLength = childNodes.length,
excludes = 'html,head,style,title,link,meta,script,object,iframe';
@FayazK
FayazK / Reusable JavaScript Functions.markdown
Last active July 24, 2017 15:25
Reusable JavaScript Functions

Reusable JavaScript Functions

@FayazK
FayazK / export-html-table-with-formatting.js
Created July 24, 2017 15:24
Export HTML Table to Excel with Formatting
var tableToExcel = (function () {
var uri = 'data:application/vnd.ms-excel;base64,',
template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>'
, base64 = function (s) {
return window.btoa(unescape(encodeURIComponent(s)))
}
, format = function (s, c) {
return s.replace(/{(\w+)}/g, function (m, p) {
return c[p];
})
<?php
foreach(str_split(base64_decode('YOUR_ENCODED_PASS_HERE')) as $chr)
echo chr(((($chr = ord($chr)) << 1) & 0xFF) | ($chr >> (8 - 1)));
@FayazK
FayazK / Frameworks.md
Last active November 13, 2018 05:45
CSS Frameworks, Libraries etc