Skip to content

Instantly share code, notes, and snippets.

@Roger
Roger / config.nix.diff
Created September 7, 2023 08:42
fix mic's priority
diff --git a/configuration.nix b/configuration.nix
index fdd9a99..9475b5c 100644
--- a/configuration.nix
+++ b/configuration.nix
@@ -22,6 +22,18 @@ let
fi
'';
lib = pkgs.lib;
+
+ # the default priorities put the internal mic above headphones one
@Roger
Roger / flake.nix
Created July 18, 2023 20:00
Flake to build nixos for raspberrypi 2 armv7l
{
inputs.nixpkgs.url = "nixpkgs/nixos-23.05";
outputs = { self, nixpkgs }:
let rpiOverlays = [
(final: super: {
# Allow missing modules because the master module list is based on strings and the rpi kernel
# is missing some
# https://github.com/NixOS/nixpkgs/issues/154163
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
{
"0": "Weeds/0/-1/Basic/Weeds/A bunch of obnoxious weeds.",
"2": "Stone/0/-300/Basic/Stone/A useful material when broken with the Pickaxe.",
"4": "Stone/0/-300/Basic/Stone/A useful material when chopped with the axe.",
"16": "Wild Horseradish/50/5/Basic -81/Wild Horseradish/A spicy root found in the spring.",
"18": "Daffodil/30/0/Basic -81/Daffodil/A traditional spring flower that makes a nice gift.",
"20": "Leek/60/16/Basic -81/Leek/A tasty relative of the onion.",
"22": "Dandelion/40/10/Basic -81/Dandelion/Not the prettiest flower, but the leaves make a good salad.",
"24": "Parsnip/35/10/Basic -75/Parsnip/A spring tuber closely related to the carrot. It has an earthy taste and is full of nutrients.",
"30": "Lumber/2/10/Basic/Lumber/A versatile resource used for building and fuel.",
mod states {
pub struct Red;
pub struct Yellow;
pub struct Green;
}
fn red(_traffic_light: &TrafficLight<states::Red>) {}
fn yellow(_traffic_light: &TrafficLight<states::Yellow>) {}
@Roger
Roger / shellexpand-combine.rs
Created January 18, 2020 15:52
shellexpand-combine.rs PoC
use std::borrow::Cow;
use std::env;
use combine::error::ParseError;
use combine::parser::char::{alpha_num, char, letter, string};
use combine::parser::combinator::recognize;
use combine::stream::Stream;
use combine::{choice, easy, many1, optional, parser, satisfy, skip_many, EasyParser, Parser};
#[derive(Debug, PartialEq)]
@Roger
Roger / sthemer.py
Created November 10, 2016 17:07
Download themes from https://terminal.sexy and convert them to st
# to use the themes, remove your colors from config.h and #include themes/themename.h
import os
import re
import json
import unicodedata
import urllib.request
USER_AGENT = 'SThemer/0.1.0'
HEADERS = {
// ==UserScript==
// @name skype redirector
// @description redirect broken skype pish urls
// @namespace r0x0r
// @include https://api.asm.skype.com/s/i*
// @version 1
// @grant none
// ==/UserScript==

Keybase proof

I hereby claim:

  • I am roger on github.
  • I am rogerduran (https://keybase.io/rogerduran) on keybase.
  • I have a public key whose fingerprint is FFE0 7873 516C 05DC FB05 E0EA B44B 10E9 4EDD 0B10

To claim this, I am signing this object:

try:
from urllib.parse import quote
except ImportError:
# Python 2
from urllib import quote
import requests
# Session
ssomobile = "https://ssomobile.personal.com.ar/loginMobile/"
(env)┌(roger@quorra)-(01:20am)-(⭠master)
└(%:~/gits/turbulenz_engine) which node
/home/roger/gits/turbulenz_engine/env/bin/node
(env)┌(roger@quorra)-(01:20am)-(⭠master)
└(%:~/gits/turbulenz_engine) node --version
v0.8.14
(env)┌(roger@quorra)-(01:20am)-(⭠master)
└(%:~/gits/turbulenz_engine) node external/tzbuild/../typescript/0.8.3/tsc.js --version