Skip to content

Instantly share code, notes, and snippets.

View aslamdoctor's full-sized avatar
💭
Always working but happy to talk 👍

Aslam Doctor aslamdoctor

💭
Always working but happy to talk 👍
View GitHub Profile
@umidjons
umidjons / pdf-thumbnail-php.md
Last active December 6, 2023 21:41
Creating PDF thumbnails in PHP

Creating PDF thumbnails in PHP

Install Ghostscript

Download and install right version of ghostscript. In my case my PHP was x86 architecture, so I download Ghostscript 9.14 for Windows (32 bit).

Enable ImageMagick

@webaware
webaware / add-to-cart.php
Last active October 22, 2023 05:55 — forked from mikejolley/functions.php
WooCommerce purchase page add-to-cart with quantity and AJAX, by customising the add-to-cart template in the WooCommerce loop. See blog post for details: http://snippets.webaware.com.au/snippets/woocommerce-add-to-cart-with-quantity-and-ajax/
<?php
/**
* Loop Add to Cart -- with quantity and AJAX
* requires associated JavaScript file qty-add-to-cart.js
*
* @link http://snippets.webaware.com.au/snippets/woocommerce-add-to-cart-with-quantity-and-ajax/
* @link https://gist.github.com/mikejolley/2793710/
*/
// add this file to folder "woocommerce/loop" inside theme
@garystorey
garystorey / pxtorem.scss
Last active November 9, 2023 16:34
Sass to convert px to rem
/**
* Convert font-size from px to rem with px fallback
*
* @param $size - the value in pixel you want to convert
*
* e.g. p {@include fontSize(12px);}
*
*/
@use "sass:math";
<?php
/*
* WordPress Breadcrumbs
* author: Dimox
* version: 2019.03.03
* license: MIT
*/
function dimox_breadcrumbs() {
/* === OPTIONS === */
@joshearl
joshearl / Fetch-sublime.settings
Last active May 2, 2017 13:34
Example Fetch.sublime-settings file that shows how to add the WordPress Plugin Boilerplate to the list of packages you can install with the Fetch plugin.
{
"files":
{
"jquery": "http://code.jquery.com/jquery.min.js"
},
"packages":
{
"html5_boilerplate": "https://github.com/h5bp/html5-boilerplate/zipball/master",
"wordpress_plugin_boilerplate": "https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/zipball/master"
}
@Yavari
Yavari / README.markdown
Created February 23, 2012 09:00 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string