Skip to content

Instantly share code, notes, and snippets.

Daniel Barlow telent

View GitHub Profile
View configure-firefox.py
#!/usr/bin/env nix-shell
#! nix-shell -i python -p python3
prefs = """
pref("toolkit.policies.perUserDir", true);
pref("ui.key.accelKey", 18);\n', # use Alt instead of Ctrl
"""
policies = {
"policies": {
@telent
telent / iso.nix
Created Nov 29, 2019
nix livecd with "blocks" support for in-place bcache addition
View iso.nix
{config, pkgs, lib, ...}:
let
maintboot = pkgs.python3Packages.buildPythonPackage rec {
pname = "maintboot";
version = "1";
src = pkgs.fetchFromGitHub {
owner = "g2p";
repo = "maintboot";
rev = "1c5ab872bae2b69a06252ca2e7ecdba4d4ad8e57";
sha256 = "0n8sy6ksqb5s1n5qqshb6pz1d86gjshwb30mr1nil0hfln5gi4g2";
@telent
telent / default.nix
Created Nov 28, 2018
arcan build with nixos
View default.nix
with import <nixpkgs> {};
stdenv.mkDerivation rec {
name = "arcan";
version="1";
src = ./.;
nativeBuildInputs = with pkgs; [
cmake git
] ;
CMAKE_CXX_FLAGS = "-msse4.1";
DRM_INCLUDE_DIR = "${pkgs.libdrm.dev}/include/libdrm";
View ralink-dtb.patch
View ilo.ino
#define RELAY_PIN (8)
void setup() {
// put your setup code here, to run once:
SERIAL_PORT_USBVIRTUAL.begin(115200); // open serial connection via USB-Serial
pinMode(RELAY_PIN, OUTPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
@telent
telent / abstract.md
Last active Jun 14, 2018
Nixcon2018 talk proposal
View abstract.md

Title

NixWRT: purely functional firmware images for IoT devices

Abstract

Reflashing your broadband router with Linux (DD-WRT or OpenWRT or Tomato or variants) gives you unparalleled flexibility to do things that the manufacturer probably hadn't thought of. Remembering what you did, six months later, is often trickier.

@telent
telent / boot.log
Last active Jun 13, 2018
Trendnet TEW712BR boot log
View boot.log
reboot: Reÿÿ
U-Boot 1.1.4 (Mar 2 2012 - 15:15:23)
AP121-2MB (ar9330) U-boot
DRAM: 32 MB
Top of RAM usable for U-Boot at: 82000000
Reserving 161k for U-Boot at: 81fd4000
Reserving 192k for malloc() at: 81fa4000
View push_github_release.rb
#!/usr/bin/env ruby
require 'uri'
require 'net/http'
require 'json'
require 'pathname'
@api_root = URI("https://api.github.com")
remote = `git config --local remote.origin.url`.chomp
View backuphost.nix
with import <nixpkgs> {};
let
platform = {
uboot = null;
endian = "big";
name = "yun";
kernelArch = "mips";
gcc = { abi = "32"; } ;
bfdEmulation = "elf32btsmip";
kernelHeadersBaseConfig = "ath79_defconfig";
View blonk.ino
#include <Adafruit_NeoPixel.h>
#define CW_PIN 5
#define CCW_PIN 6
#define FUNCTION_PIN 9
#define HUE (A1)
#define BRIGHTNESS_POT (A2)
#define STRIP_PIN 2
You can’t perform that action at this time.