Skip to content

Instantly share code, notes, and snippets.

View maxmouchet's full-sized avatar
🗺️
Mapping the Internet, one router at a time.

Maxime Mouchet maxmouchet

🗺️
Mapping the Internet, one router at a time.
View GitHub Profile
{ pkgs ? import <nixpkgs> {}} :
with pkgs;
buildFHSUserEnv {
name = "antidote9";
targetPkgs = pkgs: (with pkgs; [
dbus
firefox
fontconfig
@MikeInnes
MikeInnes / startup.jl
Last active February 5, 2023 12:54
Some useful macros for Julia
# Repeat an operation n times, e.g.
# @dotimes 100 println("hi")
macro dotimes(n, body)
quote
for i = 1:$(esc(n))
$(esc(body))
end
end
end
@MrPeteH
MrPeteH / replace_synology_ssl_certs.sh
Last active March 16, 2023 20:03 — forked from catchdave/replace_synology_ssl_certs.sh
CLI script to programmatically replace SSL certs on Synology NAS
#!/bin/sh
#
# *** For DSM v7.x ***
#
# CAUTION: DSM removes files from ~root on various system updates/upgrades. That's why this is copied across from pfSense each time.
# This version augmented with:
# - switches to use alt port instead of 22
# - configuration for several popular packages that use SSL (including correct permission updates)
# - instructions on finding all other installed packages using SSL
# - latest nginx restart
@sdiama
sdiama / althosting.txt
Last active October 13, 2023 21:00
A curated list of cheap "alternatives" to AWS, GCP, Azure hosting solutions
S3 Alternatives
---------------
- https://wasabi.com
- https://www.exoscale.com
- https://www.vultr.com
- https://www.arubacloud.com/
- https://www.digitalocean.com
- https://min.io/
- http://leo-project.net/
- https://www.backblaze.com/
@elupus
elupus / smsl_ir_codes.md
Last active January 6, 2024 17:07
SMSL IR Codes NEC32

SMSL - NEC Extended Format

The SMSL lines of products uses these NEC32 extended format ir codes.

Remote Address Address (rev)
A 3412h 482Ch
B 3512h 48ACh
C 3612h 486Ch
@tresni
tresni / README.md
Created September 8, 2020 17:49
Enabling Yubikey for sudo on OSX

Intro

Primarily, I use TouchID for sudo authentication on OSX, but I also tend to be connected to a CalDigit TS3 Plus dock and external monitors with my laptop lid closed. TouchID does not work in that situation.

In my quest to have another solution I found the instructions from Yubikey[1][2]. Unfortunately, the instructions are not well laid out, with formatting issues and some necessary information just missing. I hope to rectify that with this document.

Prerequisites

This has been tested on MacOS 10.14.6 and should work on MacOS 10.15. This README assumes you are using Homebrew; it should be possible to configure everything w

@ndevenish
ndevenish / CMakeLists.txt
Last active March 4, 2024 22:47
Very simple "Getting started" boost-python CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
# Find python and Boost - both are required dependencies
find_package(PythonLibs 2.7 REQUIRED)
find_package(Boost COMPONENTS python REQUIRED)
# Without this, any build libraries automatically have names "lib{x}.so"
set(CMAKE_SHARED_MODULE_PREFIX "")
# Add a shared module - modules are intended to be imported at runtime.
@martijnvermaat
martijnvermaat / nixos.md
Last active March 24, 2024 11:42
Installation of NixOS with encrypted root
@nat-418
nat-418 / why-tcl.md
Last active April 1, 2024 03:23
Why Tcl?

Why Tcl?

Introduction

I use [Tcl] as my scripting language of choice, and recently someone asked me why. This article is an attempt to answer that question.

Ousterhout's dichotomy claims that there are two general categories of programming languages:

@TJC
TJC / xtrans_interpolate.c
Created June 19, 2015 01:20
Fujifilm X-Trans RAW demosaicing algorithm
/* Taken from https://www.cybercom.net/~dcoffin/dcraw/dcraw.c */
/* Which itself attributes this algorithm to "Frank Markesteijn" */
#define TS 512 /* Tile Size */
#define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6]
void CLASS xtrans_interpolate (int passes)
{
int c, d, f, g, h, i, v, ng, row, col, top, left, mrow, mcol;
int val, ndir, pass, hm[8], avg[4], color[3][8];