Skip to content

Instantly share code, notes, and snippets.

View janl's full-sized avatar
🛋️
Drop ICE

Jan Lehnardt janl

🛋️
Drop ICE
View GitHub Profile
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'));
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));
npm ERR! Expected: 08be85c48743961ca5e3f8a514e73a4e77f2f8d3
npm ERR! Actual: a2b2897572112b73418be67ab3c33e3694db8862
npm ERR! From: https://registry.npmjs.org/pbkdf2/-/pbkdf2-0.0.3.tgz

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

@janl
janl / cl.sh
Last active August 29, 2015 14:02
#!/bin/sh
# https://twitter.com/bodojs/status/476973611753152512
# https://twitter.com/bodojs/status/476974684974501888
# Challenge accepted!
is_dir() {
local dir="$1";
[[ -d "$dir" ]];
}
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
> 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
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
> grunt test
Running "jshint:files" (jshint) task
>> 9 files lint free.
Running "simplemocha:unit" (simplemocha) task
․․
2 passing (6ms)
> grunt test
Running "jshint:files" (jshint) task
>> 9 files lint free.
Running "simplemocha:unit" (simplemocha) task
․․
2 passing (6ms)