Skip to content

Instantly share code, notes, and snippets.

/* This is the format a typtical snippet will be in. */
/* This infinate loop will prevent CSRF attacks but causeing the script to become unresponsive
if someone tries to load an ajax request into a script tag. The infinate loop and comment wrapped
json object will have to be parsed out before you can parse the json object.
*/
for(;;);
/* For added secuity the whole json object is wrapped in a comment */
/*
{
@TooTallNate
TooTallNate / repl-client.js
Created March 13, 2012 01:48
Full featured NodeJS repl server over a TCP socket (for node 0.6.x, uses some wacky server hacks)
var tty = require('tty')
var net = require('net')
var sock = net.createConnection(1337)
sock.on('connect', function () {
process.stdin.resume();
tty.setRawMode(true)
})
@mikeal
mikeal / gist:9242748
Last active June 23, 2020 05:17
Response to Nodejitsu NPM Trademark

I've known people at nodejitsu for years, since before the company even existed. I still consider many of them friends. That said, somebody over there has lost their mind.

Trademarks are an important part of open source. They protect the integrity of the trust that is built by any project. A classic example of why this is the case is Firefox. Suppose that a malware producer takes the Firefox codebase, which is free and open source, packages up their malware with it and then releases it as "Firefox". Then they buy search advertising and suddenly their bad and malicious version of Firefox is the first result on search engines across the web. This is clearly a bad thing for Firefox and open source everywhere, but what can Mozilla do to protect their community of users?

They can't enforce a software license since the use is permitted under the Mozilla Public License. They can, however, enforce on these hypothetical bad actors using their trademark on the word "Fi

@lanefu
lanefu / armbian-espressobin-no-br0.md
Last active November 19, 2021 22:09
armbian espressobin bridgeless networking

bwaaaah eliminate hairpinning to cpu and just use wan link

This will eliminate bridge networking, and move DHCP explicity to the WAN interface (port next to usb3) on the espressobin. Approach can be applied to the lan interfaces as well

caveat: TODO: need to double check mac addresses are probaly assigned to the interfaces and not just duplicating eth0 This involves setting MACs correctly in u-boot environment

fix services

systemctl disable NetworkManager