Skip to content

Instantly share code, notes, and snippets.

View sgress454's full-sized avatar

Scott Gress sgress454

View GitHub Profile
@sgress454
sgress454 / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../paper-button/paper-button.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@sgress454
sgress454 / sails_reload.js
Created September 19, 2014 20:25
Reload a Sails API at runtime
// Reload controller middleware
sails.hooks.controllers.loadAndRegisterControllers(function() {
sails.once('hook:orm:reloaded', function() {
// Flush router
sails.router.flush();
// Reload blueprints
sails.hooks.blueprints.bindShadowRoutes();
@sgress454
sgress454 / iterm_smart_select_for_node_stack_traces.txt
Created March 4, 2014 01:49
iTerm smart select to open Node stack traces in Sublime
To set up iTerm 2 so you can open files referenced in a Node stack trace directly in Sublime:
1. Go to Preferences->Advanced
2. Under "Smart Selection", click the "EDIT" button
3. Click the + to add a new rule
4. For the Regular expression, user ^\s*at.*\((.+)\)
5. For priority, choose Very High
6. Click "Edit Actions"
7. Click the + to add a new action
8. Title "Open in Sublime"