Skip to content

Instantly share code, notes, and snippets.

View nico202's full-sized avatar

Nicolò Balzarotti nico202

View GitHub Profile
nico202 /
Last active November 13, 2019 19:39
Includes external resources in html files. Use with: python input.html output.html (adapted from
# This takes an html, looks for script and stylesheet tags,
# download them (when necessary) and then
import sys, re, os
from collections import deque
from bs4 import BeautifulSoup, Tag
from jsmin import jsmin
from cssmin import cssmin
from urllib.parse import urlparse
import requests
nico202 / statcheck-cli
Last active February 20, 2019 09:30
statcheck command line interface
# License is GPLv2+
#!/usr/bin/env Rscript
args <- commandArgs(trailingOnly=TRUE)
if (length(args)==0) {
stop("Usage: statcheck-cli filename.txt", call.=FALSE)
} else if (length(args)==1) {
nico202 /
Last active October 30, 2018 15:28
Test julia precompilation determinism
#!/usr/bin/env bash
# The folder must be named always the same way
# Since the path is included in the .ji files
mkdir -p $d
cd $d
HOME=$(realpath .) \julia --startup-file=no -q --depwarn=no -e 'using Pkg; Pkg.add("Lazy"); using Lazy'
;;; org-chef-giallozafferano.el --- org-chef giallozafferano fetching. -*- lexical-binding: t; -*-
;; Copyright (C) 2018 Nicolò Balzarotti
;; Author: Nicolò Balzarotti <>
;; URL:
;; Created: 2018
;; Copyright 2018 Nicolò Balzarotti
nico202 /
Created February 21, 2018 10:50
julia packages -> nixpkgs
mkdir -p $wd
cd $wd
git clone --depth=1
while read url; do
git clone --depth=1 $url
done < $(find ./METADATA.jl/ -name url -exec cat '{}' \; -exec echo \; |sort -u)
;; [[][A workflow to quickly add photos to org-mode notes]]
;; use case is taking a photo of a slide in a conference and uploading
;; it to syncthing and get it on your computer. You then want to embed
;; it in an org-mode document by moving it to the subfolder and
;; renaming according to the current section of the org file, avoiding
;; name clashes
;; required libraries
(require 'dash)
(require 'swiper)
with import <nixpkgs> {};
repositoryName = stdenv.mkDerivation {
name = "repositoryName";
buildInputs = [
julia_05 # works with julia (v0.4) too
# Any other dependency you need
nico202 / backtrace
Created January 31, 2017 12:53
26-video backtrace with .alsoftrc
Thread 1 "26-video" received signal SIGSEGV, Segmentation fault.
0x000000000051d690 in OpenAL_AudioInterface::update(float) ()
(gdb) bt full
#0 0x000000000051d690 in OpenAL_AudioInterface::update(float) ()
No symbol table info available.
#1 0x00000000005200e6 in TheoraVideoManager::update(float) ()
No symbol table info available.
#2 0x00000000004b73d7 in chai3d::cVideo::update() ()
No symbol table info available.
#3 0x00000000004b749f in chai3d::cVideo::getCurrentFramePointer(chai3d::cImage&) ()
nico202 / shell.nix
Created October 12, 2016 07:38
julia git missing llvm
with import <nixpkgs> {}; {
env = stdenv.mkDerivation {
name = "0.5";
buildInputs = [
shellHook = ''
unset http_proxy
export SSL_CERT_FILE=/etc/ssl/certs/ca-bundle.crt
nico202 / gazebo-config.cmake
Created September 26, 2016 16:23
Gazebo broken cmake
set(GAZEBO_PLUGIN_PATH "/nix/store/azqhm87lhpm487459ijna60hih184pfy-gazebo-7.0.0//nix/store/azqhm87lhpm487459ijna60hih184pfy-gazebo-7.0.0/lib/gazebo-7/plugins")
# The media path contains the location on disk where images,