Skip to content

Instantly share code, notes, and snippets.

View fugudesign's full-sized avatar

Vincent Lalanne fugudesign

View GitHub Profile
@fugudesign
fugudesign / git pull with submodules
Created April 3, 2018 21:14
Git config alias for update repo and submodules
git config --global alias.update '!git pull && git submodule update --init --recursive --remote'
@fugudesign
fugudesign / grayscale.php
Last active April 27, 2018 17:06
Wordpress attachment images: generate a grayscale copy of main (full) image referenced as an image_size
/**
* Generate a grayscale copy of main (full) image referenced as an image_size
*/
function add_grayscale_image_size( $image_sizes ) {
$image_sizes[] = 'grayscale';
return $image_sizes;
}
@fugudesign
fugudesign / custom-gmap-shortcode.php
Last active May 18, 2018 14:42
Add a Wordpress shortcode to simply generate custom google maps without a plugin
<?php
/**
* Google Map Shortcode
* An optional separate file with custom styles can be loaded
* to declade the $gmapStyle variable contains the JSON as string
* change the path to match your config
*
* API KEY:
* You need to set your Google Maps API_KEY to the following constant
*
@fugudesign
fugudesign / wp-regex-original-medias.txt
Created May 22, 2018 21:44
Regex to match only Wordpress original images (no generated thumbnails)
^(?!.*-[0-9]{1,4}x[0-9]{1,4}).*\.(?:jpe?g|gif|png)$
@fugudesign
fugudesign / vince.zsh-theme
Created February 26, 2019 13:27
oh-my-zsh custom theme based on agnoster
# vim:ft=zsh ts=2 sw=2 sts=2
#
# Vince's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
@fugudesign
fugudesign / react-native-yellowbox-off.js
Created February 26, 2019 15:36
Disable yellowbox on react-native
console.disableYellowBox = true;
@fugudesign
fugudesign / README.md
Last active March 12, 2019 11:39
Recursively exclude __tests__ folders from Webstorm

Cdiscount exclude tests from searches in Webstorm

Open scopes preferences

File | Settings | Appearance and Behavior | Scopes for Windows and Linux

WebStorm | Preferences | Appearance and Behavior | Scopes for macOS

Add a custom scope

  • Click on + button
  • Set :