Skip to content

Instantly share code, notes, and snippets.

View pierrebilac's full-sized avatar

Pierre Bilac pierrebilac

View GitHub Profile
@Log1x
Log1x / README.md
Last active June 10, 2024 00:59
Envoyer Hooks for Bedrock+Sage w/ RunCloud

Envoyer Hooks for Bedrock+Sage w/ RunCloud

This is a simple breakdown of how I deploy Bedrock+Sage using RunCloud and Envoyer.

Hooks

Install Theme Dependencies

cd {{ release }}/web/app/themes/sage
@ryanemitchell
ryanemitchell / blade.xml
Created December 14, 2022 23:03
Sage Blade Directives for PHPStorm - place in projects .idea folder and restart the IDE
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BladeInjectionConfiguration" default="false">
<directives>
<!-- Sage Directives - WordPress - https://log1x.github.io/sage-directives-docs/usage/wordpress.html-->
<data directive="@query" injection="true" prefix="(" suffix=")"/>
<data directive="@posts" injection="true" prefix="(" suffix=")"/>
<data directive="@hasposts" injection="true" prefix="(" suffix=")"/>
<data directive="@noposts" injection="true" prefix="(" suffix=")"/>
<data directive="@titl"/>
@lukecav
lukecav / Commands
Last active May 19, 2024 14:55
Speed up wp db export using WP-CLI
# Export site database using wp db export
wp db export /wp-content/wordpress-dump.sql --all-tablespaces --single-transaction --quick --lock-tables=false
# Gzip compress the recent database export
gzip wordpress-dump.sql
# Export sites database using wp db export and gzip compress
wp db export --all-tablespaces --single-transaction --quick --lock-tables=false - | gzip -9 - > wordpress-dump.sql.gz
@ganapativs
ganapativs / iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup.md
Last active June 23, 2024 10:41
iTerm2 + oh-my-zsh + Pure theme + zsh plugins setup

Symfony 4 CRUD best practices

Step by step

Two shots CRUD packages installation

composer require --dev sec-checker profiler server
composer require annotations twig asset translator form doctrine validator
@seanhandley
seanhandley / docker-compose.yml
Last active June 7, 2024 19:25
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@EdenK
EdenK / wp-cf7-add-custom-form-tag.php
Created January 22, 2018 21:30
Wordpress: Contact form 7, Add form tag (shortcode) current url example
<?php
/**
* Wordpress: Contact form 7, Add form tag (shortcode) current url example
*/
add_action( 'wpcf7_init', 'wpcf7_add_form_tag_current_url' );
function wpcf7_add_form_tag_current_url() {
// Add shortcode for the form [current_url]
wpcf7_add_form_tag( 'current_url',
'wpcf7_current_url_form_tag_handler',
array(

Mettre en production un projet Symfony 4 sur un VPS OVH

VPS OVH | Ubuntu 16.04.3 LTS | LAMP | SYMFONY 4

Pré-requis

  • Votre projet doit être versionné avec git et hébergé (Github, Bitbucket...).
  • Vous devez avoir acheté un VPS et un nom de domaine.
  • Vous devez également générer une clé SSH sur votre ordinateur. (explications ci-dessous)

Création et ajout de la clé SSH au profil OVH

@davepullig
davepullig / gist:efddb9a894e0c4a824b4b61183cfb01c
Last active July 3, 2024 08:19
WP CLI search and replace URLs for WordPress multisite
wp search-replace --network --url=website.dev website.dev website.tld --precise --all-tables
@moskalukigor
moskalukigor / functions.php
Created August 28, 2017 13:01 — forked from zorzv/functions.php
Autocomplete Taxonomy Terms in Wordpress
//Custom Autocomplete
add_action('wp_ajax_nopriv_get_listing_names', 'ajax_listings');
add_action('wp_ajax_get_listing_names', 'ajax_listings');
function ajax_listings() {
global $wpdb; //get access to the WordPress database object variable
//get names of all taxonomy terms
$name = '%'.$wpdb->esc_like(stripslashes($_GET['name'])).'%'; //escape for use in LIKE statement
$sql = "SELECT term.term_id as id, term.name as post_title, term.slug as guid, tax.taxonomy FROM $wpdb->term_taxonomy tax