Skip to content

Instantly share code, notes, and snippets.

View arslanfarooq's full-sized avatar

Arslan Farooq arslanfarooq

  • Pakistan
View GitHub Profile
@arslanfarooq
arslanfarooq / git-commit-log-stats.md
Created October 23, 2019 11:06 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@arslanfarooq
arslanfarooq / export_users.php
Created October 3, 2019 10:26 — forked from fahdi/export_users.php
Export ExpressionEngine members to CSV
<?php
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename=member_export.csv');
header('Pragma: no-cache');
?>
{!--
Exports the EE members in CSV format. This is only accessible to admins and editors.
Does not export members in the banned or guests groups.
@arslanfarooq
arslanfarooq / for-include-or-functions.php
Created May 2, 2018 05:49 — forked from carasmo/for-include-or-functions.php
Add Custom Post Type and Taxonomy Terms to wp_link_query. Link search function in WordPress editor add Custom Post Types and Taxonomy Terms
<?php
//don't re add the php tag above
add_filter('wp_link_query', 'cab_add_custom_post_type_archive_link', 10, 2);
/**
* Add Custom Post Type archive to WordPress search link query
* Author: https://github.com/mthchz/editor-archive-post-link/blob/master/editor-archive-post-link.php
*/
function cab_add_custom_post_type_archive_link( $results, $query ) {
@arslanfarooq
arslanfarooq / TileLayer.Common.js
Created April 18, 2018 07:09 — forked from mourner/TileLayer.Common.js
Leaflet shortcuts for common tile providers
// Lefalet shortcuts for common tile providers - is it worth adding such 1.5kb to Leaflet core?
L.TileLayer.Common = L.TileLayer.extend({
initialize: function (options) {
L.TileLayer.prototype.initialize.call(this, this.url, options);
}
});
(function () {
@arslanfarooq
arslanfarooq / Extend Recent Posts
Last active March 12, 2018 14:24 — forked from paulruescher/Extend Recent Posts
Used this to change the output of WordPress' Recent Posts Widget
<?php
/**
* Extend Recent Posts Widget
*
* Adds different formatting to the default WordPress Recent Posts Widget
*/
Class My_Recent_Posts_Widget extends WP_Widget_Recent_Posts {
function widget($args, $instance) {
@arslanfarooq
arslanfarooq / 70e04a67f1f5fd96a708.md
Created May 3, 2017 05:25 — forked from oshliaer/70e04a67f1f5fd96a708.md
Extract Gmail content to a spreadsheet #gas #gmail #sheet
@arslanfarooq
arslanfarooq / modal-video-full.html
Created April 27, 2017 12:39 — forked from anam-hossain/modal-video-full.html
Full example - autoplay youtube video in a Modal (Bootstrap + Jquery)
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
<script>
$(function() {
$(".video").click(function () {
var theModal = $(this).data("target"),
videoSRC = $(this).attr("data-video"),
@arslanfarooq
arslanfarooq / sanfrancisco-font.css
Created June 23, 2016 05:13
San Francisco Web Font
/**
* http://applemusic.tumblr.com/
* https://jsfiddle.net/xq56dmrh/
*/
/** Ultra Light */
@font-face {
font-family: "San Francisco";
font-weight: 100;
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-ultralight-webfont.woff");