Skip to content

Instantly share code, notes, and snippets.

View sja's full-sized avatar

Sebastian Janzen sja

  • innoQ Deutschland GmbH
  • Odenthal
View GitHub Profile
@SmartFinn
SmartFinn / dhcp-leases-to-dns.rsc
Last active April 30, 2024 12:57
MikroTik (RouterOS) script for automatically setting DNS records for clients when they obtain a DHCP lease
# MikroTik (RouterOS) script for automatically setting DNS records
# for clients when they obtain a DHCP lease.
#
# author SmartFinn <https://gist.github.com/SmartFinn>
:local dnsTTL "00:15:00";
:local token "$leaseServerName-$leaseActMAC";
# Normalize hostname (e.g. "-= My Phone =-" -> "My-Phone")
# - truncate length to 63 chars
'use strict';
let Service = require("HAP-NodeJS").Service;
let Characteristic = require("HAP-NodeJS").Characteristic;
let WebSocketClient = require('websocket').client;
class Utils {
assertUtf8Message(message) {
return new Promise((resolve, reject) => {
if (message.type === 'utf8') {
@essen
essen / http_specs.md
Last active January 10, 2022 02:01
HTTP and related specifications
@WebReflection
WebReflection / gist:5084045
Last active January 15, 2018 22:52
Boot to node: An Arch Linux on Raspberry PI + WiFi + node.js quick guide through
# these info are valid today
# 4th March 2013
# flush latest Arch for Pi dist
# via dd or other ways
# With A DHCPed Network Cable
pacman -Syu
sync
reboot
@stephenmckinney
stephenmckinney / zsh_prezto_rbenv_post_rvm.md
Last active December 10, 2015 16:19
Moving from RVM to rbenv with prezto on Mac OS X Mountain Lion

Uninstall RVM

rvm implode

Then remove any reference to RVM in .z* files.

Install rbenv

@adammw
adammw / README.md
Created August 3, 2012 06:30
Node.js for Raspberry Pi

Node.js for Raspberry Pi

Pre-built binaries

Recent releases have been pre-built using cross-compilers and this script and are downloadable below.

If you have found these packages useful, give me a shout out on twitter: @adammw

@zenkay
zenkay / gist:3237860
Created August 2, 2012 15:19
Installation tips for RVM/Ruby on OSX 10.8 Mountain Lion

Ruby, RVM and Mountain Lion

Key problems

Mountain Lion (10.8) has three main difference compared to Lion (10.7):

  • XCode 4.4 does not install Command Line Tools by default
  • X11 isn't available anymore
  • The installed version of OpenSSL has some bugs

How to work around