Skip to content

Instantly share code, notes, and snippets.

View neilmock's full-sized avatar

Neil Mock neilmock

View GitHub Profile
@rkitover
rkitover / systemd-237-static-libudev.patch
Last active January 22, 2024 07:42
patch to build a static libudev from systemd 237 sources
diff -ruN systemd-237/meson.build systemd-237.new/meson.build
--- systemd-237/meson.build 2018-01-28 10:58:17.000000000 -0500
+++ systemd-237.new/meson.build 2018-02-17 06:01:17.921840048 -0500
@@ -805,7 +805,7 @@
libmount = dependency('mount',
version : '>= 2.30',
- required : not fuzzer_build)
+ required : false)
@extremecoders-re
extremecoders-re / qemu-networking.md
Last active March 31, 2024 17:19
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@lilactown
lilactown / promises.re
Last active August 20, 2022 07:56
Notes on using JavaScript Promises in ReasonML/BuckleScript
/**
* Making promises
*/
let okPromise = Js.Promise.make((~resolve, ~reject as _) => [@bs] resolve("ok"));
/* Simpler promise creation for static values */
Js.Promise.resolve("easy");
Js.Promise.reject(Invalid_argument("too easy"));
@busypeoples
busypeoples / PhantomTypeReasonML.md
Last active February 6, 2024 21:29
Phantom types in ReasonML

Phantom types in ReasonML

Introduction

"A phantom type is a parametrised type whose parameters do not all appear on the right-hand side of its definition..." Haskell Wiki, PhantomType

The following write-up is intended as an introduction into using phantom types in ReasonML.

Taking a look at the above definition from the Haskell wiki, it states that phantom types are parametrised types where not all parameters appear on the right-hand side. Let's try to see if we can implement a similar example as in said wiki.

@jacobsalmela
jacobsalmela / ltsp.conf
Created April 21, 2016 16:36
dnsmasq config file for iPXE booting with an existing DHCP server
# Sample configuration for dnsmasq to function as a proxyDHCP server,
# enabling LTSP clients to boot when an external, unmodifiable DHCP
# server is present.
# The main dnsmasq configuration is in /etc/dnsmasq.conf;
# the contents of this script are added to the main configuration.
# You may modify the file to suit your needs.
# Don't function as a DNS server:
port=0
@nberger
nberger / reagent_infinite_scroll.cljs
Last active March 18, 2021 10:20
Reagent infinite scroll
(ns views.infinite-scroll
(:require
[reagent.core :as r]))
(defn- get-scroll-top []
(if (exists? (.-pageYOffset js/window))
(.-pageYOffset js/window)
(.-scrollTop (or (.-documentElement js/document)
(.-parentNode (.-body js/document))
(.-body js/document)))))
@john2x
john2x / 00_destructuring.md
Last active April 23, 2024 13:18
Clojure Destructuring Tutorial and Cheat Sheet

Clojure Destructuring Tutorial and Cheat Sheet

(Related blog post)

Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.

Vectors and Sequences

@miguelmota
miguelmota / README.md
Last active March 16, 2024 12:52
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/