Skip to content

Instantly share code, notes, and snippets.

@elliotf
elliotf / debug.js
Created November 22, 2013 00:38
struggling with sequelize foreign key constraints
var Sequelize = require('sequelize')
, _ = require('lodash')
, config = require('./config/config.json')['development']
, options
, sequelize
, Feed
, Article
;
options = {
@elliotf
elliotf / package.json
Last active December 29, 2015 01:19
sequelize example "enforcing a foreign key reference" -- trying to get to work
{
"dependencies": {
"sequelize": "~2.0.0-beta.1",
"sqlite3": "~2.1.19"
}
}
@elliotf
elliotf / ldap_reuse.js
Last active January 4, 2016 16:59
reuse of an ldap client
var ldap = require('ldapjs')
, port = 1389
, host = '127.0.0.1'
;
var server = ldap.createServer();
var client;
var showFailure = process.argv.indexOf('fail') > -1;
var serverDelay = 100;
@elliotf
elliotf / segfault.js
Created July 11, 2014 23:50
Make knex segfault
var Knex = require('./');
var config = require('./test/knexfile');
var db = Knex(config.maria);
@elliotf
elliotf / How-To.md
Last active August 27, 2022 22:07 — forked from ionspin/How-To.md
How to make an up-to-date OpenWRT image for loading onto a Raspberry Pi Compute Module 4 with a DFRobot Router Carrier Board.

The background is that the default OpenWRT image for Raspberry Pi lacks drivers for the LAN port (RTL8111) on the DFRobot board. DFRobot provide an image, but that one is made from a quite old daily snapshot of OpenWRT which is not entirely stable. Also, it is better to know how to fish than be given a fish.

DFRobot's page about the router board:
https://wiki.dfrobot.com/Compute_Module_4_IoT_Router_Board_Mini_SKU_DFR0767

OpenWRT main page:
https://openwrt.org/

You are expected to have some general knowledge on Linux and OpenWRT. The instructions for flashing the resulting firmware image are presented on DFRobot's page.