Skip to content

Instantly share code, notes, and snippets.

echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
// Scraping Made Easy with jQuery and SelectorGadget
// (http://blog.dtrejo.com/scraping-made-easy-with-jquery-and-selectorga)
// by David Trejo
//
// Install node.js and npm:
// http://joyeur.com/2010/12/10/installing-node-and-npm/
// Then run
// npm install jsdom jquery http-agent
// node numresults.js
//
@lordnox
lordnox / app.js
Created May 27, 2011 09:59
Express / Socket.IO sessions issue
// [~/Documents/code/node/myapp](master)$ ./bin/node -v
// => v0.2.1
// [~/Documents/code/node/myapp](master)$ ./bin/express -v
// => 1.0.0rc4
/**
* Module dependencies.
*/
require.paths.unshift(__dirname + '/lib/node');
@lordnox
lordnox / js2xml.coffee
Created January 5, 2012 17:04
Obj2XML Parser Coffeescript
###
Object 2 XML Parser
@author Tobias Kopelke <[email protected]>
based on jsontoxml from Ryan Day @ https://github.com/soldair/node-jsontoxml
Example of 'special' object properties
node =
name: 'node-name'
attributes: 'node-attribs'
var Twit = require("twit");
var config = require('./oauthconfig');
console.log("config:");
console.log(config);
var T = new Twit({
consumer_key: config.consumer_key,
consumer_secret: config.consumer_secret,
access_token: config.access_token,
/**
* Workaround to make defining and retrieving angular modules easier and more intuitive.
*/
(function(angular) {
var origMethod = angular.module;
var alreadyRegistered = {};
/**
{
request: function(url, method, data, headers) {
var request;
if (method == null) {
method = "GET";
}
request = angular.isObject(url) ? angular.copy(url) : {
url: url
};
request.method = request.method || method || "GET";
module.run(function($rootScope) {
$rootScope.$on($stateChangeSuccess, function($event, toState, toParams, fromState, fromParams) {
if(toState.title)
$rootScope.title = toState.title
})
})
module.config(function($stateProvider) {
$stateProvider.state('myState', {
data : {
@lordnox
lordnox / whatsapp_phone_enumerator_floated_div.js
Created May 16, 2017 17:39
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses (floated div)
/*
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses
Floated div edition
01-05-2017
(c) 2017 - Loran Kloeze - [email protected]
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds
of information from a range of phonenumbers. It doesn't matter if these numbers are part
of your contact list. At the end a table is displayed containing phonenumbers, profile pics,
about texts and online statuses. The online statuses are being updated every