Skip to content

Instantly share code, notes, and snippets.

Jan Lehnardt janl

Block or report user

Report or block janl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9230982
diff --git a/lib/core/environment.js b/lib/core/environment.js
index 28eaead..109b1f0 100644
--- a/lib/core/environment.js
+++ b/lib/core/environment.js
@@ -23,7 +23,7 @@ exports.getConfig = function (platform, env, project_dir, argv) {
project_dir = '/' + path.relative('/', project_dir);
// location of project's package.json
- var pkgfile = require(project_dir + '/package.json');
+ var pkgfile = require(path.resolve(project_dir, '/package.json'));
View gist:9231277
diff --git a/lib/core/environment.js b/lib/core/environment.js
index 28eaead..7f1706f 100644
--- a/lib/core/environment.js
+++ b/lib/core/environment.js
@@ -20,10 +20,10 @@ var utils = require('../utils');
exports.getConfig = function (platform, env, project_dir, argv) {
// Remove driver letter on windows
- project_dir = '/' + path.relative('/', project_dir);
+ project_dir = path.resolve('/', path.relative('/', project_dir));
View gist:9984803
npm ERR! Expected: 08be85c48743961ca5e3f8a514e73a4e77f2f8d3
npm ERR! Actual: a2b2897572112b73418be67ab3c33e3694db8862
npm ERR! From: https://registry.npmjs.org/pbkdf2/-/pbkdf2-0.0.3.tgz
View howto.md

How to run http://filippo.io/Heartbleed/ / https://github.com/FiloSottile/Heartbleed yourself

http://filippo.io/Heartbleed/ is a great service to the community.

I wouldn’t recommend testing hosts againt an online tool. All you do is create a log for a security savvy person with vulnerable hosts. While not quite the same, this is similar to uploading private keys or passwords to a service to check if they are secure.

Luckily it is easy to run the software locally, as the author was so kind to provide the source. I don’t read go very well, but a cursory glance suggests that the software does what it says on the tin, so we don’t worry about it phoning home.

This is the first time I’m building a go project, so I have to install go first. brew install go is easily done. You can get binary distributions for your OS from the go homepage: https://code.google.com/p/go/downloads/list

View cl.sh
#!/bin/sh
# https://twitter.com/bodojs/status/476973611753152512
# https://twitter.com/bodojs/status/476974684974501888
# Challenge accepted!
is_dir() {
local dir="$1";
[[ -d "$dir" ]];
}
View devclean.diff
commit 39d3b5066038d2e1da35a3d5e231bab6271eaae7
Author: Jan Lehnardt <jan@apache.org>
Date: Tue Aug 19 18:28:20 2014 +0200
add devclean target that cleans out the dev cluster state
diff --git a/Makefile b/Makefile
index ed927ba..ea1aba8 100644
--- a/Makefile
+++ b/Makefile
View 0cmds
> curl http://admin:asd@127.0.0.1:15984/_users -XPUT
{"ok":true}
jan@rose ~/Work/2.0-couchdb
> curl -v http://127.0.0.1:15984/_users/_all_docs
* About to connect() to 127.0.0.1 port 15984 (#0)
* Trying 127.0.0.1...
* Adding handle: conn: 0x7ffbfc004400
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
View gist:10f874b72d63def7105e
attachment_names.js attachment_views.js coffee.js
attachment_paths.js attachments.js delayed_commits.js
attachment_ranges.js attachments_multipart.js erlang_views.js
View gist:0458446af3fa425bd89c
> grunt test
Running "jshint:files" (jshint) task
>> 9 files lint free.
Running "simplemocha:unit" (simplemocha) task
․․
2 passing (6ms)
View gist:0fdf85a704d8dc0b32ac
> grunt test
Running "jshint:files" (jshint) task
>> 9 files lint free.
Running "simplemocha:unit" (simplemocha) task
․․
2 passing (6ms)
You can’t perform that action at this time.