Skip to content

Instantly share code, notes, and snippets.


Pierre de la Martinière martpie

Block or report user

Report or block martpie

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
martpie / ActiveLink.tsx
Created Jul 26, 2019
ActiveLink component for Next.js 9
View ActiveLink.tsx
martpie / render404Error.ts
Created Jun 14, 2019
Return a 404 from a Next.js page render method (ssr + client-side)
View render404Error.ts
import React from 'react';
import ErrorPage from 'next/error';
// Allow to render the error page + return the correct error code with SSR
// It is a hack and has the disadvantage of logging this server-side
// A better solution is welcome.
export const render404Error = () => {
if (process.browser) {
martpie / small-js-exercises.js
Last active Jan 19, 2018
Small JS exercises
View small-js-exercises.js
* Small JS exercices
* Consider all exercises independant from each other and running in their own scope
* What is the output of this piece of code?
martpie / keymap.cson
Last active Mar 15, 2019
Get emmet-atom working fine with Atom and autocomplete-plus
View keymap.cson
# Will make autocomplete trigger with 'enter' instead of 'tab'
'atom-text-editor:not(mini) .autocomplete-plus.autocomplete-suggestion-list':
'tab': 'unset!'
'enter': 'autocomplete-plus:confirm'
# Use 'expand-abbreviation' instead of 'expand-abbreviation-with-tab' for tab keybinding
'.pane .editor:not(.mini)':
'tab': 'emmet:expand-abbreviation'
martpie / gmaps.html
Created Aug 20, 2014
Google Maps v3 API snippet
View gmaps.html
<!-- Map -->
<div id="map_canvas" class="relative" style="height:600px;z-index: 4;"></div>
<!-- Maps Generator -->
<script src=""></script>
window.onload = function() {
View Custom language menu for WPML.php
/* Pierre de la Martinière
* display all languages avalaible for a Wordpress Theme using WPML
* directly echo something like "en fr it ru" ...
* more info at
You can’t perform that action at this time.