Skip to content

Instantly share code, notes, and snippets.

Avatar

Jamy Timmermans JamyDev

View GitHub Profile
@JamyDev
JamyDev / addon.js
Created Dec 27, 2012
jugglingdb-mongodb issue
View addon.js
module.exports = function (compound) {
compound.models.Servertype.all(function (err, servertypes) {
compound.routeMapper.namespace('scpad', function (scpad) {
servertypes.forEach(function (servertype) {
console.log(servertype);
compound.models.Addon.all({where: {servertype: servertype.id}}, function (err, addons) {
console.log(addons);
@JamyDev
JamyDev / client.js
Created Jul 13, 2015
Example ws Beam client
View client.js
var ws = require("ws");
var sock = new ws("wss://beam.pro/socket.io/?__sails_io_sdk_version=0.11.0&__sails_io_sdk_platform=node&__sails_io_sdk_language=javascript&EIO=3&transport=websocket", {
headers: {
'User-Agent': 'Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.81 Safari/537.36'
}
});
sock.on("open", function() {
setInterval(function() {
@JamyDev
JamyDev / README.md
Last active Aug 29, 2015
Sails sockets stuff?
View README.md

Installation

put stuff in same folder

npm install socket.io-client@0.9 bluebird

then run siotest.js

Should first error and then connect

@JamyDev
JamyDev / index.js
Created Jan 8, 2015
Beam.pro chatbot (Chuck Norris)
View index.js
// YOU NEED NODE.JS TO RUN THIS
// Please run the following command first: npm install ws readline request tough-cookie
// Then run the program with: node filename.js
var WebSocket = require('ws');
var readline = require('readline');
var request = require('request');
// Various options
var options = {
View keybase.md

Keybase proof

I hereby claim:

  • I am JamyDev on github.
  • I am jamydev (https://keybase.io/jamydev) on keybase.
  • I have a public key whose fingerprint is 157F FC3E 23B6 850F D807 0A12 5793 2B02 026F 638D

To claim this, I am signing this object: