Skip to content

Instantly share code, notes, and snippets.

View benfavre's full-sized avatar
💻
At the office

Webdesign29 benfavre

💻
At the office
View GitHub Profile
@benfavre
benfavre / machine.js
Last active November 25, 2019 10:03
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)
@benfavre
benfavre / machine.js
Created November 22, 2019 11:27
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@benfavre
benfavre / activ-front
Created November 2, 2018 19:48
activ-front
{}
<div class="col-md-12">
<?php
// WP_Query arguments
$args = array(
'post_type' => array('adresses'),
'orderby' => 'menu_order',
'order' => 'ASC',
'child_of' => 1,
'posts_per_page' => 10
@benfavre
benfavre / pods.php
Last active August 14, 2018 14:11
Shortcode WordPress PODS
<?php
function productsList ()
{
ob_start ();
// On commence un "buffer" ici pour
// capturer le contenu qui va sortir de la fonction
$params = array(
'limit' => 20,
'order_by' => 'menu_order',
@benfavre
benfavre / gist:9ba894134f43123eaf5ff9a6d44f302a
Created August 13, 2018 14:01
MYSQL / MARIADB error | Can't init tc log
[Note] Recovering after a crash using tc.log
[ERROR] Can't init tc log
[ERROR] Aborting
FIX:
rm /var/lib/mysql/tc.log
Then:
sudo service mysql start
sudo ufw allow out to any port 53
#!/bin/bash
set -e
GVERSION="1.10.3"
GFILE="go$GVERSION.linux-amd64.tar.gz"
GOPATH="$HOME/go"
GOROOT="/usr/local/go"
if [ -d $GOROOT ]; then
echo "Installation directory already exists $GOROOT"