This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// If strings starts with substr | |
'myString'.startsWith('my', 0 /* start searching */); // true | |
// If string ends with substr | |
'myString'.endsWith('ring', 8 /* end searching */); // true | |
// If strings has another substr | |
'myString'.includes('str', 0 /* start searching */); // true | |
// Multiply string | |
'woof '.repeat(5); | |
// -- Template strings | |
// String interpolation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pkg_resources, pprint | |
requires = {p.key: [r.key for r in p.requires()] for p in pkg_resources.working_set} | |
def graph(pkg): | |
if not requires[pkg]: | |
return {pkg: {}} | |
return {pkg: {k: v for p in requires[pkg] for k, v in graph(p).items() }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- copy this to YOUR_THEME.tmTheme--> | |
<dict> | |
<key>name</key> | |
<string>diff: deleted</string> | |
<key>scope</key> | |
<string>markup.deleted</string> | |
<key>settings</key> | |
<dict> | |
<key>background</key> | |
<string>#EAE3CA</string> |