Skip to content

Instantly share code, notes, and snippets.

View marcellodesales's full-sized avatar

Marcello DeSales marcellodesales

View GitHub Profile
@marcellodesales
marcellodesales / npm-debug.log
Created October 6, 2014 21:03
Trying to publish a NodeJs module for Nexus 2.10.0 SNAPSHOT: Fails to publish
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'publish' ]
2 info using npm@1.3.10
3 info using node@v0.10.25
4 verbose publish [ '.' ]
5 verbose cache add [ '.', null ]
6 verbose cache add name=undefined spec="." args=[".",null]
7 verbose parsed url { protocol: null,
7 verbose parsed url slashes: null,
7 verbose parsed url auth: null,
@marcellodesales
marcellodesales / Auth value incorrect
Last active August 29, 2015 14:07
npm publish on NEXUS 2.10.0 - Packets captured using Wireshark
Based on https://www.ietf.org/rfc/rfc2045.txt, something needs to be transformed.
$ echo 'admin:admin123' | openssl base64
YWRtaW46YWRtaW4xMjMK
$ Accepted:
YWRtaW46YWRtaW4xMjM=
Last character used was "=".
#!/usr/bin/env python
# Compare a file on S3 to see if we have the latest version
# If not, upload it and invalidate CloudFront
import fnmatch
import os
import boto
import pprint
import re
/** @module lib/Todos Docs */
"use strict";
var builder = require("xmlbuilder");
/**
* @param {object} todosJson is instance of the json report.
* @return {object} An XML representation of the todos based on sourceforge's todo.
*/
### Keybase proof
I hereby claim:
* I am marcellodesales on github.
* I am marcellodesales (https://keybase.io/marcellodesales) on keybase.
* I have a public key whose fingerprint is E1A5 0439 EE01 0DF4 D70A 377F 2B6A FBE5 7EB7 4C28
To claim this, I am signing this object:
// Confirm the new user by retrieving the password submitted.
User.confirmNewUser = function(id, code, submittedUser, next) {
console.log("Submitted User ID: " + id + "; Data to confirm: " + JSON.stringify(submittedUser));
// Find the user by ID submitted
// http://docs.strongloop.com/display/public/LB/Exposing+models+over+REST
User.findById(id, function (err, savedUser) {
if (err) {
throw err;
@marcellodesales
marcellodesales / 1.INSTALLING EPEL
Created June 21, 2015 18:41
NPM Enterprise Installation on RHEL 7
[root@pppdc9prd8tl tmphttps://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/chap-Managing_Services_with_systemd.html
$ sudo ln -s /usr/lib/systemd/system /etc/init
[root@pppdc9prd8tl npme]# mkdir /etc/systemd/system/npme.d
[root@pppdc9prd8tl npme]# ln -s /etc/systemd/system/npme.d /etc/init
[root@pppdc9prd8tl npme]# ls -la /etc/init
lrwxrwxrwx. 1 root root 26 Jun 20 13:36 /etc/init -> /etc/systemd/system/npme.d]# cd /tmp
[root@pppdc9prd8tl tmp]# wget https://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
[root@pppdc9prd8tl tmp]# ls *.rpm
> db.SondeDataContainer.stats()
{
"ns" : "netbeams.SondeDataContainer",
"count" : 2419200,
"size" : 1170892976,
"storageSize" : 1358632416,
"nindexes" : 20,
"ok" : 1
}
> db.SondeDataContainer.find( {"observation.pH":4.52, "observation.Battery":1.4} ).explain()
{
"cursor" : "BasicCursor",
"startKey" : {
},
"endKey" : {
},
"nscanned" : 2419200,
@marcellodesales
marcellodesales / build.gradle
Created April 24, 2012 10:55
This is a structure of a gradle project that uses a version-controlled Maven repository.
/*
* The plugins used for this build.
*/
/*
* Provides the compile, test, jar, etc tasks
*/
apply plugin: 'java'
/*
* Generates the Eclipse project files.