Skip to content

Instantly share code, notes, and snippets.


Erwann Mest kud

View GitHub Profile
View Main.sublime-menu
"id": "view",
"children": [
"id": "layout",
"children": [
"command": "set_layout",
"caption": "3 Pane top",
import sublime
import sublime_plugin
import json
class ExampleCommand(sublime_plugin.TextCommand):
def run(self, edit):
span = self.view.sel()[0]
text = sublime.decode_value(self.view.substr(span))
"""This file contains the ModuleLoader class."""
import sublime
import os
import re
import json
from NodeRequirer.src import utils
HAS_REL_PATH_RE = re.compile(r"\.?\.?\/")
IS_EXPORT_LINE_COMMONJS = re.compile(r"exports\.(.*?)=")
kud / hosts
Created Jul 25, 2019
Backup of /etc/hosts on macOS
View hosts
# Host Database
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
## localhost broadcasthost
::1 localhost
kud / fr_FR.json
Last active Mar 24, 2021
French translation for countries. Useful for libraries like intl-tel-input .
View fr_FR.json
"af": "Afghanistan (‫افغانستان‬‎)",
"al": "Albanie (Shqipëri)",
"dz": "Algérie (‫الجزائر‬‎)",
"as": "Samoa américaines (American Samoa)",
"ad": "Andorre (Andorra)",
"ao": "Angola",
"ai": "Anguilla",
"ag": "Antigua-et-Barbuda (Antigua and Barbuda)",
"ar": "Argentine (Argentina)",
kud / App.jsx
Last active Jan 9, 2018
A way to track users with react-router. tags: #react #react-router
View App.jsx
import React from "react"
import { BrowserRouter as Router, Route, Switch } from "react-router-dom"
import PageTracker from "~/routes/PageTracker"
import HomePage from "~/pages/Home"
class App extends React.Component {
render() {
return (
kud /
Last active Jan 9, 2018
Transform array of strings to array of numbers. #js

Transform array of strings to array of numbers

You have an array of strings and you want to have numbers instead?

This is the trick.

kud / ease-your-rem.css
Last active Jan 9, 2018
Now you'll be able to /10 your px to put them in rem instead of /16. tags: #css
View ease-your-rem.css
html {
font-size: 62.5%;
body {
font-size: 1.6rem;
kud / AnchorLink.js
Last active Aug 21, 2018
<AnchorLink /> — A react component to handle anchor links with a better animation (and without unfocusing the current element!). tags: #react
View AnchorLink.js
kud / fix-iframe-ios.css
Last active Apr 4, 2019
Fix 100% width iframe on iOS. tags: #css #fix
View fix-iframe-ios.css
iframe {
min-width: 100%;
width: 100px;
*width: 100%;