Skip to content

Instantly share code, notes, and snippets.

Training a stubborn dog is forever a greater challenge than training a regular dog, but in most cases, once the stubborn dog is well trained, they are some of the most obedient dogs. A professional trainer once told me about one of the most stubborn dogs he ever trained. He said he was within days of sending her back to the owner and giving up and all at once a light bulb went off in her head and it all came together. She went on to win the Grand Hunting Retriever Championship title at one of the youngest ages ever. The trainer said she turned out to be one of the smartest dogs he had ever trained!
In view of the fact that we are talking about training a stubborn dog we will begin by using a long lead rope and a pinch collar. When the pinch collar tightens down on the dogs neck, it pinches somewhat and the more resistance the dog offers, the more pain the collar produces.Do not use any commands as you begin walking your dog with a 50' lead. Let the dog wonder on his own until he reaches the end of the 50 lea
@eugeneware
eugeneware / atomic.js
Created July 14, 2012 14:48
Atomic Update Problem
var stream = require('stream');
var fs = require('fs');
// clear the data file
fs.writeFileSync('data.txt', '0');
// Returns a stream that emits a series of asynchronously generated events
var getStream = function() {
var s = new stream.Stream();
@eugeneware
eugeneware / 1. Safari Youtube URL to Jasmine.js
Created September 27, 2012 11:57
Jasmine Youtube App Bookmarklet
javascript:(function(){document.location.href='jasmine://video/'+document.location.href.match(/[\?&]v=([^&]+)/)[1]})();
[Service]
Type=simple
ExecStartPre=/bin/mount --make-rprivate /
# Enable forwarding to allow NAT to work
# TODO: Move this to sysctl.conf
ExecStartPre=/sbin/sysctl -w net.ipv4.ip_forward=1
# Try to use this alternate way of starting docker if docker crashes for you:
# ExecStart=/bin/bash -c "/usr/bin/nohup /usr/bin/docker -d -D &"
# You also need to update Type above to: Type=forking
localhost units # ls -al
total 16
drwxr-xr-x 2 root root 4096 Aug 4 04:50 .
drwxr-xr-x 6 102 5000 4096 Aug 3 06:23 ..
-rw-r--r-- 1 root root 467 Aug 4 04:50 docker.service
-rw-r--r-- 1 root root 207 Aug 3 11:58 hello.service
localhost units # pwd
/media/state/units
localhost units # cat docker.service
[Service]
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =2
let g:netrw_dirhist_1='/Users/eugene/Dropbox/work/level-mapreduce'
let g:netrw_dirhist_2='/Users/eugene/Dropbox/work/scratch/sorted-stream'
@eugeneware
eugeneware / -
Created September 22, 2013 03:17
{
"ircPassword": "password",
"polyhub": {
"user": "deux",
"pass": "89EOSlook"
}
}
@eugeneware
eugeneware / test2.js
Created October 6, 2013 23:10
How to write code that supports BOTH callbacks and promises
var Q = require('q');
/**
* Promise functions that take both node callbacks and promises
*/
function half(cb) {
var d = Q.defer();
setImmediate(function() {
d.resolve(21);
var five = require("johnny-five"),
board = new five.Board();
board.on("ready", function() {
//(new five.Led(13)).strobe();
var servo1 = new five.Servo({ pin: 10, type: 'continuous' });
var servo2 = new five.Servo({ pin: 11, type: 'continuous' });
board.repl.inject({
servo1: servo1,
servo2: servo2
var level = require('level');
var query = require('level-queryengine');
var fulltext = require('fulltext-engine');
var rimraf = require('rimraf').sync;
rimraf(__dirname + '/db');
var db = query(level(__dirname + '/db', {
valueEncoding: 'json'
}));