Skip to content

Instantly share code, notes, and snippets.

@lellimecnar
lellimecnar / custom-tabs
Created October 4, 2018 17:36
Atom config
<span style="display:block;position:absolute;top:-2px;left:22px"><%
var dirname = path.dirname(relativeFilePath).split(path.sep).join('/');
if (dirname.startsWith('ui-src/public/') || dirname.startsWith('app/templates/twig/')) {
var dirs = dirname.replace('ui-src/public/', '').replace('app/templates/twig/', '').split('/');
%><strong><%= dirs.shift() %></strong><%= path.sep %><%= dirs.join(path.sep) %><%
} else {
if (dirname.startsWith('..')) {
dirname = path.dirname(filePath).replace(process.env.HOME, '~');
}
%><%= dirname %><%

Keybase proof

I hereby claim:

  • I am lellimecnar on github.
  • I am lellimecnar (https://keybase.io/lellimecnar) on keybase.
  • I have a public key ASDlxnuwgJkcRa9Qli2GtaVbosb6T4JG1u9InBIcjzb7Mgo

To claim this, I am signing this object:

type PropertyPathKey<
P extends string | number,
K extends number | string
> = `${number}` extends `${K}`
? `${P}[${number}]` | `${P}.${number}`
: "" extends P
? K
: `${P}.${K}`;
type PropertyPathStr<