Skip to content

Instantly share code, notes, and snippets.

View codesharpdev's full-sized avatar
🏠
Working from home

Salman Saifi codesharpdev

🏠
Working from home
View GitHub Profile
@codesharpdev
codesharpdev / dropdwon-menu
Created October 1, 2013 09:51
css3 animated responcive menu
// CSS3 animated & responsive dropdown menu
(function(){
/* Mobile */
$('#menu-wrap').prepend('<div id="menu-trigger">Menu</div>');
$("#menu-trigger").on("click", function(){
$("#menu").slideToggle();
});
// iPad
var isiPad = navigator.userAgent.match(/iPad/i) != null;

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@codesharpdev
codesharpdev / HtmlSanitizer.cs
Created February 29, 2016 18:04 — forked from ntulip/HtmlSanitizer.cs
HTML Sanitizer for C#
/**
Copyright (c) 2009 Open Lab, http://www.open-lab.com/
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@codesharpdev
codesharpdev / gist:be6079f6810f115bab0d
Created February 29, 2016 20:18 — forked from jcsrb/gist:1081548
get avatar from google profiles, facebook, gravatar, twitter, tumblr
function get_avatar_from_service(service, userid, size) {
// this return the url that redirects to the according user image/avatar/profile picture
// implemented services: google profiles, facebook, gravatar, twitter, tumblr, default fallback
// for google use get_avatar_from_service('google', profile-name or user-id , size-in-px )
// for facebook use get_avatar_from_service('facebook', vanity url or user-id , size-in-px or size-as-word )
// for gravatar use get_avatar_from_service('gravatar', md5 hash email@adress, size-in-px )
// for twitter use get_avatar_from_service('twitter', username, size-in-px or size-as-word )
// for tumblr use get_avatar_from_service('tumblr', blog-url, size-in-px )
// everything else will go to the fallback
// google and gravatar scale the avatar to any site, others will guided to the next best version
@codesharpdev
codesharpdev / index.js
Created November 1, 2016 20:27 — forked from cynx/index.js
index.js - no vertical scroll
$(document).ready(function () {
$('#datatab tfoot th').each(function () {
$(this).html('<input type="text" />');
});
var oTable = $('#datatab').DataTable({
"serverSide": true,
"ajax": {
@codesharpdev
codesharpdev / gist:fea467faa34beb56ecf8c50ebe3bc559
Created January 17, 2017 11:44 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@codesharpdev
codesharpdev / wordpress.web.config.xml
Created February 24, 2017 07:44 — forked from chrisdempsey/wordpress.web.config.xml
web.config for Wordpress by SAOTN
<!-- source: https://www.saotn.org/my-wordpress-web-config/ -->
<?xmlversion="1.0"encoding="UTF-8"?>
<configuration>
<configSections>
<!--
Load HttpBL assembly to keep suspicious and malicious web robots
out. Get your Access Key @ https://www.projecthoneypot.org/create_account.php
-->
<section name="HttpBL" type="HttpBL.Settings" />
@codesharpdev
codesharpdev / pagination.cfm
Created August 16, 2017 12:51 — forked from steinbring/pagination.cfm
How to do pagination within ColdFusion This is an example of how to handle pagination in ColdFusion. This simple example can be manipulated by changing the values of the four variables at the top of the file.
<!--- How many pages should you link to at any one time? --->
<cfset intPagesToLinkTo = 5>
<!--- How many items are you displaying per page? --->
<cfset intItemsPerPage = 10>
<!--- How many items do you need to display, across all pages. --->
<cfset intNumberOfTotalItems = 100>
<!--- What is the current page you are on? --->
<cfif isdefined("url.page")>
<cfset intCurrentPage = val(url.page)>
<cfelse>