Skip to content

Instantly share code, notes, and snippets.

Erwann Mest kud

Block or report user

Report or block kud

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
"""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 May 20, 2019
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 / FormattedMessage.jsx
Last active Mar 9, 2018
An override of <FormattedMessage /> from yahoo/react-intl to be able to have capitalize mode. tags: #react
View FormattedMessage.jsx
import React from "react"
import _ from "lodash"
import { FormattedMessage as RiFormattedMessage } from "react-intl"
class FormattedMessage extends React.Component {
static defaultProps = {
mode: "",
render() {
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%;
kud / index.html
Last active Jan 9, 2018
Smooth scroll to anchor. Bonus: it does not unfocus the current element. tags: #js
View index.html
<div id="myAnchor"></div>
You can’t perform that action at this time.