Skip to content

Instantly share code, notes, and snippets.

View renshuki's full-sized avatar
💭
🇫🇷 🇯🇵 🇺🇸

Francois-Clement Brossard renshuki

💭
🇫🇷 🇯🇵 🇺🇸
View GitHub Profile
@renshuki
renshuki / recalculate-acf-locations.php
Last active July 7, 2023 01:15 — forked from RadGH/recalculate-acf-locations.php
Update ACF location fields (Google Map) after WP All Import CSV import (Google map update not triggered correctly) - Credits: https://support.advancedcustomfields.com/forums/topic/how-to-update-google-map-latitudelongitude-after-importing-using-address/
<?php
global $ld_recalc;
global $geolocate_api_key;
$geolocate_api_key = "YOUR_GOOGLE_GEOLOCATE_API_KEY";
$ld_recalc = array(
'posts_per_run' => 16,
'post_types' => array( 'distributor' ),
@renshuki
renshuki / tmux_cheatsheet.md
Last active November 11, 2017 08:48 — forked from henrik/tmux_cheatsheet.markdown
Tmux Cheatsheet

Tmux Cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@renshuki
renshuki / middlewares.py
Created June 13, 2017 04:59 — forked from seagatesoft/middlewares.py
An example of RotateUserAgentMiddleware
from random import choice
from scrapy import signals
from scrapy.exceptions import NotConfigured
class RotateUserAgentMiddleware(object):
"""Rotate user-agent for each request."""
def __init__(self, user_agents):
self.enabled = False
self.user_agents = user_agents
@renshuki
renshuki / zsh.md
Created October 7, 2016 16:36 — forked from tsabat/zsh.md
Getting oh-my-zsh to work in Ubuntu
@renshuki
renshuki / vhost.py
Created August 31, 2016 02:02 — forked from fideloper/vhost.py
Create vHost Ubuntu Lamp-Server (bash and python)
#! /usr/bin/python
from sys import argv
from os.path import exists
from os import makedirs
from os import symlink
from os import system
import getopt
#