Skip to content

Instantly share code, notes, and snippets.

@sheshtawy
sheshtawy / elixir.json
Created March 19, 2021 12:54
Some handy VS Code snippets for Elixir debugging, follow the steps here to create a new snippets file for elixir, the add these to it https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets
{
"IEx.pry": {
"prefix": "pry",
"body": [
"require IEx",
"IEx.pry()$0"
],
"description": "Insert a pry breakpoint"
},
"IO.inspect": {
import math
math.sqrt((4 * math.pi) * (65953.7669564 / (1864.11372905 ** 2)))
body { background: #222; color: #e6e6e6; }
a { color: #949494; }
a:link, a:visited { color: #5d97ff; }
a:hover, a:active, a:focus { color: #5c9bff; }
hr { border-bottom: 1px solid #424242; border-top: 1px solid #222; }
@sheshtawy
sheshtawy / better-nodejs-require-paths.md
Created February 25, 2018 22:46 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

# Sublime settings

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>