Skip to content

Instantly share code, notes, and snippets.

View qaisarirfan's full-sized avatar

Qaisar Irfan qaisarirfan

  • Arbisoft
  • Lahore, Pakistan
View GitHub Profile
* Downloaded or downloading
=============================
**http://kickass.to/infiniteskills-learning-jquery-mobile-working-files-t7967156.html
**http://kickass.to/lynda-bootstrap-3-advanced-web-development-2013-eng-t8167587.html
**http://kickass.to/lynda-css-advanced-typographic-techniques-t7928210.html
**http://kickass.to/lynda-html5-projects-interactive-charts-2013-eng-t8167670.html
**http://kickass.to/vtc-html5-css3-responsive-web-design-course-t7922533.html
*http://kickass.to/10gen-m101js-mongodb-for-node-js-developers-2013-eng-t8165205.html
*http://kickass.to/cbt-nuggets-amazon-web-services-aws-foundations-t7839734.html
@qaisarirfan
qaisarirfan / Common-Currency.json
Created January 3, 2018 07:01 — forked from ksafranski/Common-Currency.json
Common Currency Codes in JSON
{
"USD": {
"symbol": "$",
"name": "US Dollar",
"symbol_native": "$",
"decimal_digits": 2,
"rounding": 0,
"code": "USD",
"name_plural": "US dollars"
},
@qaisarirfan
qaisarirfan / image-post-facebook-page.php
Created December 8, 2017 19:06
Image post facebook page
$data = array();
$data['url'] = $image->original;
$data['caption'] = 'caption';
$data['access_token'] = $facebook->access_token;
$post_url = $facebook->api_url . $facebook->page_id . '/photos';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $post_url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($ch, CURLOPT_POST, 1);
@qaisarirfan
qaisarirfan / arabic.regex
Created October 20, 2017 05:31 — forked from rrshaban/arabic.regex
Arabic regex
[\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\uFDF0-\uFDFD]
@qaisarirfan
qaisarirfan / gist:c7f5547c2e5edb039e28fe763697ed67
Created October 19, 2017 12:25 — forked from salcode/gist:6912619
jQuery function to remove all "data-" attributes from a given element
// removes all data attributes from a target element
// example: removeDataAttributes('#user-list');
function removeDataAttributes(target) {
var i,
$target = $(target),
attrName,
dataAttrsToDelete = [],
dataAttrs = $target.get(0).attributes,
dataAttrsLen = dataAttrs.length;
@qaisarirfan
qaisarirfan / apple-mq.css
Created May 24, 2016 12:51 — forked from AllThingsSmitty/apple-mq.css
iPhone 6/6 Plus and Apple Watch CSS media queries
/* iPhone 6 landscape */
@media only screen and (min-device-width: 375px)
and (max-device-width: 667px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 2)
{ }
/* iPhone 6 portrait */
@media only screen
and (min-device-width: 375px)
@qaisarirfan
qaisarirfan / gist:97b7611c7558d7d4544d
Created March 3, 2016 07:02
Remove canonical link added by yoast wordpress seo plugin
<!-- This site is optimized with the Yoast WordPress SEO plugin v1.2.5 - http://yoast.com/wordpress/seo/ -->
<link rel="canonical" href="http://www.example.com/link/" />
<meta property='og:locale' content='en_us'/>
<meta property='og:title' content='title - Example'/>
<meta property='og:url' content='http://www.example.com/link/'/>
<meta property='og:site_name' content='Example'/>
<meta property='og:type' content='article'/>
<!-- / Yoast WordPress SEO plugin. -->
To remove it, simply add the following code to the end of your theme's functions.php file, just before the closing php tag.
@qaisarirfan
qaisarirfan / Previous post link in specific category
Last active February 18, 2016 13:13
Get next and previous post link in specific category in wordpress
Paste this code in your directory wordpress theme functions.php file
<?php
if(!function_exists(NEXT_PREVIOUS_POST_LINK)){
function NEXT_PREVIOUS_POST_LINK( $separator = '-', $labels = array( 'prev'=> 'Previous', 'next'=> 'Next' ) ){
// current post ID
$ID = get_the_id();
$CATEGORY = get_the_category();
// current category ID
$CURRENT_CAT_ID = $CATEGORY[0]->cat_ID;