Skip to content

Instantly share code, notes, and snippets.

akihikodaki /
Last active Apr 11, 2021
Linux Desktop on Apple Silicon/M1 in Practice

Linux Desktop on Apple Silicon/M1 in Practice

I bought M1 MacBook Air. It is the fastest computer I have, and I have been a GNOME/GNU/Linux user for long time. It is obvious conclusion that I need practical Linux desktop environment on Apple Silicon/M1.

Fortunately, Linux already works on Apple Silicon/M1. But how practical is it?


Meltdown fix impact on Redis performances in virtualized environments

UPDATE: apparently kernel difference may have a serious impact, so I'll redo the test from scratch.

Test performed with AOF enabled, fsync policy 1 second, allowing the rewrites to be triggered.

Command lines used:

BusFactor1Inc / scheme-coin.lisp
Created Dec 16, 2017
A Common Lisp Blockchain - Scheme Coin
View scheme-coin.lisp
;; scheme coin - a common lisp blockchain
;; Burton Samograd
;; 2017
(load "~/quicklisp/setup.lisp")
(defconstant *coin-name* "Scheme Coin")
chrisdone / Printf.idr
Last active Apr 9, 2021
Type-safe dependently-typed printf in Idris
View Printf.idr
module Printf
%default total
-- Formatting AST.
data Format
= FInt Format
| FString Format
| FOther Char Format
| FEnd
mowings /
Last active Apr 2, 2021
ffmpeg stream and save video from Dahua 4300s IP Camera

Use ffmpeg to stream video from a dahua 4300s to a file or files

You can use ffmpeg to directly pull frames off of a dahua 4300s at full resolution. May be a good alternative to pricey dvrs which likely cannot record at full resolution, may not work with the camera, or are prohibitevly expensive

Simple Stream to file

Simple stream to file. Full resolution

ffmpeg -loglevel debug -rtsp_transport tcp -i "rtsp://admin:admin@" \
-c copy -map 0 foo.mp4
ghl3 / _ImmutableDatabase
Last active Jun 13, 2020
Implementation of an immutable database in postgres
We couldn’t find that file to show.
geraldvillorente / sitemap-crawler.php
Last active Mar 10, 2021
Sitemap crawler to test 301 and 404.
View sitemap-crawler.php
* Crawl the sitemap.xml for 301 redirections and 404 errors.
* Source:
* To use this script you need to allocate a huge amount of time to maximum_execution_time to
* avoid Fatal error: Maximum execution time...I suggest to run this script on terminal.
* Ex: $ php test-xml.php > ~/Desktop/sitemap-curl-result.txt
* For 3000 links the average time the script consumed is around 45 minutes to 1 hour.
back2dos / ClassList.hx
Last active Jan 8, 2020
Store all class names for runtime use.
View ClassList.hx
package ;
#if macro
import haxe.macro.Context.*;
using haxe.macro.Tools;
class ClassList {
static var NAME = 'ClassList';//must be the fully qualified name of this class
macro static function build() {
maxivak / 00.
Last active May 14, 2020
Importing/Indexing database (MySQL or SQL Server) in Solr using Data Import Handler
View 00.
AndrasKovacs / Perm.agda
Last active Apr 5, 2020
Permutation relation in Agda. In the indiuctive definition we have insertions on both sides, as opposed to one side. This makes the transitivity proof *horrible* (or at least I couldn't do better).
View Perm.agda
open import Data.List
open import Data.Nat
open import Relation.Binary.PropositionalEquality
open import Function
open import Data.Product
open import Data.Sum
data _▶_≡_ {A : Set}(x : A) : List A List A Set where
here : {xs} x ▶ xs ≡ (x ∷ xs)