Skip to content

Instantly share code, notes, and snippets.

View crishnakh's full-sized avatar
💻
Ey! Listen!

Francisco Gálvez crishnakh

💻
Ey! Listen!
View GitHub Profile
@Zodiac1978
Zodiac1978 / .htaccess
Last active June 10, 2024 18:57
Make your Website faster - a safe htaccess way
#
# Sources:
# http://stackoverflow.com/questions/7704624/how-can-i-use-gzip-compression-for-css-and-js-files-on-my-websites
# http://codex.wordpress.org/Output_Compression
# http://www.perun.net/2009/06/06/wordpress-websites-beschleuinigen-4-ein-zwischenergebnis/#comment-61086
# http://www.smashingmagazine.com/smashing-book-1/performance-optimization-for-websites-part-2-of-2/
# http://gtmetrix.com/configure-entity-tags-etags.html
# http://de.slideshare.net/walterebert/die-htaccessrichtignutzenwchh2014
# http://de.slideshare.net/walterebert/mehr-performance-fr-wordpress
# https://andreashecht-blog.de/4183/
@maccath
maccath / gist:3981205
Created October 30, 2012 16:09
Split PDF to individual pages using FPDI and FPDF
<?php
/**
* Split PDF file
*
* <p>Split all of the pages from a larger PDF files into
* single-page PDF files.</p>
*
* @package FPDF required http://www.fpdf.org/
* @package FPDI required http://www.setasign.de/products/pdf-php-solutions/fpdi/
@devoncrouse
devoncrouse / clean_audio.sh
Created May 7, 2013 17:02
Using Sox (http://sox.sourceforge.net) to remove background noise and/or silence from audio files (individually, or in batch).
# Create background noise profile from mp3
/usr/bin/sox noise.mp3 -n noiseprof noise.prof
# Remove noise from mp3 using profile
/usr/bin/sox input.mp3 output.mp3 noisered noise.prof 0.21
# Remove silence from mp3
/usr/bin/sox input.mp3 output.mp3 silence -l 1 0.3 5% -1 2.0 5%
# Remove noise and silence in a single command
@martinrusev
martinrusev / imap-search
Last active March 22, 2024 06:50
IMAP Search criteria
<?php
add_action( 'after_setup_theme', 'bootstrap_setup' );
if ( ! function_exists( 'bootstrap_setup' ) ):
function bootstrap_setup(){
add_action( 'init', 'register_menu' );
@tivnet
tivnet / woocommerce_category_list.sql
Created May 29, 2014 03:22
WooCommerce category list SQL query
--
-- @author Gregory Karpinsky, http://www.tiv.net/
-- @version 14.05.28
--
SELECT
tp.name Cat,
t.name Subcat
FROM
wp_term_taxonomy tt,
wp_terms t,
@devluis
devluis / horizontal-responsive-multilevel-menu.html
Last active June 9, 2021 14:38
Responsive Multilevel Horizontal Menu only with CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Responsive Multilevel Horizontal Menu</title>
<meta content="width=device-width, initial-scale=1, maximum-scale=1" name="viewport">
<style>
#menu ul {
margin: 0;
padding: 0;
@Jarvvski
Jarvvski / issue.php
Last active June 25, 2020 11:35
How to create a Github issue using the API within PHP
// $Token = personal access token for the account that will post the issue
$headerValue = " Bearer " . $token;
// Format the curl heaer (-H) with our auth code
$header = array("Authorization:" . $headerValue);
// Content for the issue
$title = "I have a problem";
$body = "I broke it, how can i fix it?";
@stormwild
stormwild / woocommerce-create-order.md
Last active November 5, 2023 01:40
WooCommerce Creating Order Programmatically

WooCommerce Creating Order Programmatically

WooCommerce Create Order

creating Woocommerce order with line_item programatically

// http://stackoverflow.com/questions/26581467/creating-woocommerce-order-with-line-item-programatically
$address = array(
            'first_name' => 'Fresher',
@pierrejoubert73
pierrejoubert73 / psql-import-db-dump.md
Last active June 14, 2024 17:24
How to import a dump file in PSQL.

Open terminal.

Connect to psql:

psql -p 5433

I find it easier to delete and recreate the DB to which you want to import. So ensure the databse you want to delete is listed:

\l