Skip to content

Instantly share code, notes, and snippets.

View pietromalerba's full-sized avatar

Pietro Malerba pietromalerba

  • M3
  • Civitanova Marche (MC) - Italy
View GitHub Profile
@chronon
chronon / ext.txt
Created February 18, 2017 15:38
List of docker-php-ext-install extension names
Possible values for ext-name:
bcmath
bz2
calendar
ctype
curl
dba
dom
enchant
@Jany-M
Jany-M / .htaccess
Last active March 27, 2024 12:14
[WP] htacces for best security & caching settings
####################################################
#
# MIMETYPES
#
####################################################
AddType video/mp4 mp4 m4v
AddType audio/mp4 m4a
AddType video/ogg ogv
@julienbourdeau
julienbourdeau / clean-prestashop-db.sql
Last active March 13, 2025 17:41
Clean PrestaShop database - Drop old and unless data
# Delete all logs
TRUNCATE ps_log;
# Delete old connection data (only used for stats)
# change 2016-02-01 00:00:00 according to you needs
DELETE c, cs
FROM ps_connections c
LEFT JOIN ps_connections_source cs ON (c.id_connections = cs.id_connections)
WHERE c.date_add < '2016-02-01 00:00:00';
@parmentf
parmentf / GitCommitEmoji.md
Last active May 12, 2025 06:48
Git Commit message Emoji
@miziomon
miziomon / gulfile.js
Created August 26, 2015 09:55
my gulp config
/*
* https://github.com/gulpjs/gulp
* http://code.tutsplus.com/tutorials/using-gulp-for-wordpress-automation--cms-23081
* https://markgoodyear.com/2014/01/getting-started-with-gulp/
* http://mattbanks.me/gulp-wordpress-development/
*
*/
var gulp = require('gulp'),
through = require('gulp-through'),
@emmajane
emmajane / gist:59321345a81a4f5837c0
Last active February 28, 2024 16:35
JQL Syntax for the Impatient

JQL Syntax for the Impatient

There are a few JQL syntax bits to get you started:

  • AND --- allows you to add qualifiers to a list
  • != Thing --- target one thing
  • is in (List, Of, Things) --- target a bunch of things (Done, Closed, Resolved) typically
  • not in (List, of, Things) --- do not include a bunch of things
  • -1w --- relative time. You can also use -1d for day
  • "2015/3/15" --- specific dates
@niraj-shah
niraj-shah / parse_file_upload.php
Created December 30, 2014 11:15
How to upload a file to Parse using the Official Parse PHP SDK
<?php
// define location of Parse PHP SDK, e.g. location in "Parse" folder
// Defaults to ./Parse/ folder. Add trailing slash
define( 'PARSE_SDK_DIR', './Parse/' );
// include Parse SDK autoloader
require_once( 'autoload.php' );
// Add the "use" declarations where you'll be using the classes
use Parse\ParseClient;
@bitflower
bitflower / dl-file.php
Last active October 18, 2023 18:00 — forked from hakre/dl-file.php
File protection depending on ACF (Advanced custom fields) field.
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@pietromalerba
pietromalerba / Json-api-ACF.php
Created May 29, 2014 19:00 — forked from diegochavez/Json-api-ACF.php
Wordpres json ACF
add_filter('json_api_encode', 'json_api_encode_acf');
function json_api_encode_acf($response)
{
if (isset($response['posts'])) {
foreach ($response['posts'] as $post) {
json_api_add_acf($post); // Add specs to each post
}
}
@magnetikonline
magnetikonline / README.md
Last active April 23, 2025 12:33
Setting Nginx FastCGI response buffer sizes.