Skip to content

Instantly share code, notes, and snippets.

View schovi's full-sized avatar
👁️

David Schovanec schovi

👁️
View GitHub Profile
@schovi
schovi / better-nodejs-require-paths.md
Created May 31, 2016 07:37 — 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

@schovi
schovi / README.markdown
Created January 9, 2016 17:04 — forked from karmi/README.markdown
echo 'Přečti mi něco, prosím!' | ruby dictator.rb

A simple dictation robot.

echo 'Přečti mi něco, prosím!' | ruby dictator.rb

cat data.txt | ruby dictator.rb

cat data.txt | SPEED=1.5 ruby dictator.rb
@schovi
schovi / REAME.md
Created September 24, 2013 10:05 — forked from romansklenar/REAME.md

How to set up your VPS with Chef Solo

1. What is it?

There are many different provisioning tools out there, the most popular of which are Chef and Puppet. Chef uses Ruby, Puppet uses a DSL (Domain Specific Language), there are others that use simple bash too, but today we're going to focus on Chef Solo.

2. Dependencies

To get Chef working properly on your local machine you need a few things.

Make sure you use Ruby 1.9.x and not Ruby 2.x as you will get errors with the json 1.6.1 gem on 2.x. Use rbenv or RVM to manage several different Rubies on the one machine.

DELETE
DELETE _template/{name}
DELETE {index}
DELETE {index}/_alias/{name}
DELETE {index}/_query
DELETE {index}/_warmer
DELETE {index}/_warmer/{name}
DELETE {index}/{type}
DELETE {index}/{type}/_mapping
DELETE {index}/{type}/_query
@schovi
schovi / can-notify.md
Created December 6, 2012 08:36 — forked from amcdnl/can-notify.md
CanJS Notification System

CanJS Notification System

This widget creates a growl-like notification on a website using CanJS framework.

JavaScript

steal('can/construct',
	  'can/construct/super',
	  'can/construct/proxy',

'can/control',