Skip to content

Instantly share code, notes, and snippets.

View rjmacarthy's full-sized avatar
🐁
The Tetris effect

rj rjmacarthy

🐁
The Tetris effect
  • The Wilderness
  • 03:29 (UTC +01:00)
View GitHub Profile
@rjmacarthy
rjmacarthy / HowTo.md
Created February 17, 2016 14:03
Webpack frontend / backend

Backend reload

forever --watch --watchDirectory="./server/" server/app.js

Front end reload

webpack-dev-server --hot --inline --history-api-fallback

Webpack config with proxy for backend.

@rjmacarthy
rjmacarthy / Redux-React-Counter-Example
Created February 4, 2016 12:36
Redux and React Simple JSBIN
https://jsbin.com/debohu/1/edit?html,js,output
@rjmacarthy
rjmacarthy / subdomain
Created January 27, 2016 12:24
Node.js Nginx Subdomain
server {
listen 80;
server_name www.subdomain.domain.com;
return 301 subdomain.domain.com;
}
server {
listen 80;
server_name subdomain.domain.com;
Update model via mongodb shell:
db.model.update({"_id" : ObjectId("id")}, { $set : { thing : "tothing"}})
@rjmacarthy
rjmacarthy / vpn
Created September 8, 2015 09:18
IPsec VPN
http://sourceforge.net/projects/l2tp-ipsec-vpn/files/l2tp-ipsec-vpn/1.0.9/
@rjmacarthy
rjmacarthy / d3-bar-chart
Created July 22, 2015 12:17
D3 Bar Chart
http://jsfiddle.net/Qh9X5/5726/
@rjmacarthy
rjmacarthy / 2of3.js
Last active August 29, 2015 14:19
Bitcoin 2 of 3 Multisig Address Node.js
var privateKeys = [];
var publicKeys = [];
var privKeysStr = [];
for (var i = 0; i < 3; i++) {
var privateKey = new bitcore.PrivateKey();
privKeysStr.push(privateKey.toString());
privateKeys.push(privateKey);
}
@rjmacarthy
rjmacarthy / Client.js
Last active October 13, 2015 05:26
Sails.js Socket.io Configuration
socket = io.connect();
socket.on('connect', function socketConnected() {
socket.on('sockets', function newMessageFromSails ( data ) {
console.log(data); // Data from socket
});
});
@rjmacarthy
rjmacarthy / bundle-command
Created April 16, 2015 09:59
Knockout Browserify
browserify app.js -o bundle.js
@rjmacarthy
rjmacarthy / knockout fiddle
Last active August 29, 2015 14:18
Pure Knockout Fiddle
https://jsfiddle.net/xggu9Lv2/4/