Skip to content

Instantly share code, notes, and snippets.

View apraga's full-sized avatar

Alexis Praga apraga

View GitHub Profile
@apraga
apraga / main.rs
Created June 26, 2024 13:28
PMID to DOI (rust)
use entrez_rs::eutils::{EFetch, Eutils, DB};
use entrez_rs::parser::pubmed::PubmedArticleSet;
fn main() {
let xml = EFetch::new(DB::Pubmed, vec!["5337378", "33448306"])
.run()
.expect("Connection error");
let parsed = PubmedArticleSet::read(&xml).expect("Parsing error");
###############################################################
# A skin for a terminal with a light background
# This skin uses RGB values so won't work for some
# terminals.
#
# Contributed by [@apraga](https://github.com/apraga)
###############################################################
skin: {
default: rgb(251,241,199) none
@apraga
apraga / rtl18723-999.ebuild
Last active January 22, 2023 20:09
rtl18723 ebuild for Gentoo
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit git-r3 linux-mod linux-info
DESCRIPTION="Driver for the rtl8723 wireless chipset"
HOMEPAGE="https://github.com/lwfinger/rtl8723bu"
@apraga
apraga / flake.nix
Created August 26, 2022 21:29
PATH issue with Nextflow
{
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
};
description = "test";
outputs = { self, nixpkgs }:
let
@apraga
apraga / metro.hs
Created August 23, 2022 15:06
Parsec example
import qualified Data.Text.IO as TIO
import Data.Maybe
import Data.Time
import Data.Time (defaultTimeLocale)
import Control.Monad
-- show
import Text.Parsec
import Control.Applicative
@apraga
apraga / configuration-wsl2.nix
Last active September 2, 2022 21:25
NixOS: configuration wsl2
{ lib, pkgs, config, modulesPath, ... }:
with lib;
let
nixos-wsl = import ./nixos-wsl;
in
{
imports = [
"${modulesPath}/profiles/minimal.nix"
./cachix.nix
@apraga
apraga / configuration.nix
Last active August 31, 2022 19:13
NixOS configuration : emacs native comp, patched nix
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ...}:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
# Avoid compilation for emacs nativecomp
@apraga
apraga / gist:2b944b217226553759ae94379e13547e
Created August 17, 2022 12:36
ExomeDepth 1.1.15 fails to build
@nix { "action": "setPhase", "phase": "unpackPhase" }
unpacking sources
unpacking source archive /nix/store/5qml11z03vjrk9hgvm0y3amwfgc5dzy3-ExomeDepth_1.1.15.tar.gz
source root is ExomeDepth
setting SOURCE_DATE_EPOCH to timestamp 1578531002 of file ExomeDepth/MD5
@nix { "action": "setPhase", "phase": "patchPhase" }
patching sources
@nix { "action": "setPhase", "phase": "configurePhase" }
configuring
@nix { "action": "setPhase", "phase": "buildPhase" }
@apraga
apraga / Main.hs
Last active January 31, 2022 12:08
Todotxt -> taswarrior for done.txt
import Data.List.Split
import Data.Time
import Data.Time.Clock.POSIX
import Data.Maybe
import Control.Monad
import qualified Data.Text as T
import qualified Data.Text.IO as TIO
import Data.UUID
import Data.UUID.V4
@apraga
apraga / init.vim
Last active February 10, 2022 18:35
Vimrc
filetype plugin indent on " Load plugins according to detected filetype.
syntax on " Enable syntax highlighting.
set incsearch " Highlight while searching with / or ?.
set hlsearch " Keep matches highlighted.
set ignorecase smartcase " Better search
set relativenumber
" Plugins
call plug#begin('~/.vim/plugged')
" Plug 'SirVer/ultisnips' " Track the engine.