Skip to content

Instantly share code, notes, and snippets.

@mattstauffer
mattstauffer / dabblet.css
Created Jul 9, 2012 — forked from dstorey/dabblet.css
set the size of the boxes and any decoration
View dabblet.css
.slider {
/* set initial width */
width: 520px;
/* hide the content that overflows (to allow second box to show through) */
overflow: hidden;
display: inline-block;
/* skew container so that it has angled edge, and set up transition */
transform: skewX(-20deg);
View parents.scss
// SASS
nav {
a {
color: green;
li.selected & {
color: red;
}
}
}
@mattstauffer
mattstauffer / gist:a2376484ea2e19325e3c
Last active Mar 5, 2020 — forked from rtablada/gist:dcf0f82d8ca4c914fd9b
Something something node modules something
View gist:a2376484ea2e19325e3c

(just a test, this is written by @rtablada not me)

After working with a lot of node modules I'm a bit angered by the fact that for a lot of these packages you have to pass around and keep track of a single shared instance throughout your application.

This works fine for small proxy servers and apps where the whole thing fits into a single app.js or maybe a handful of route files. But as things start to grow this model really breaks down and becomes cumbersome.

Just think about a resource file for app/resources/users.js which needs the current Redis or RabbitMQ connection to publish events like user registration, a database connection to persist things, and probably a Socket.io instance because it's Real Time: it's so hot right now! If you export a function that allows these to be injected, your resource has boilerplate.