Skip to content

Instantly share code, notes, and snippets.

View josemarcosrf's full-sized avatar
🏔️
Working from a mountain top

Jose Marcos RF josemarcosrf

🏔️
Working from a mountain top
View GitHub Profile
@josemarcosrf
josemarcosrf / config.yaml
Last active December 31, 2024 10:29
Fusuma (https://github.com/iberianpig/fusuma) configuration file (.config/fusuma/config.yml) using fusuma-sendkey instead of xdotool to work on Wayland
swipe:
4:
right:
sendkey: "LEFTALT+RIGHT" # History forward
left:
sendkey: "LEFTALT+LEFT" # History back
up:
sendkey: "LEFTCTRL+T" # Open new tab
keypress:
LEFTSHIFT:
@josemarcosrf
josemarcosrf / cinnamon_py.omp.json
Created October 26, 2024 11:38
Oh-My-Posh slightly modified template based on Cinnamon's changing the colors to a earth palette and adds python info on the right side
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
// ---------- New Python Segment ----------
{
"type": "prompt",
"alignment": "right",
"segments": [
{
"type": "python",
@josemarcosrf
josemarcosrf / jandedobbeleer_py.omp.json
Created October 24, 2024 18:37
Oh-My-Posh slightly modified template based on JanDeDobbeleer's to add python info on the right side
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"version": 2,
"final_space": true,
"console_title_template": "{{ .Shell }} in {{ .Folder }}",
"blocks": [
// ---------- New Python Segment ----------
{
"type": "prompt",
"alignment": "right",
@josemarcosrf
josemarcosrf / nerdfonts-chromeos.md
Created October 22, 2024 09:01 — forked from meatcoder/nerdfonts-chromeos.md
Customizing Chrome OS Terminal (Crostini) to enable Nerd Fonts

If you're like me, you want to use Nerd Fonts for your editor and the terminal. If you use a terminal based editor like neovim or emacs, then you need that configued on your terminal emulator. But if you're using Chrome OS, which is more locked down than other desktop OS, then the usually simple task of installing these font and using them isn't as straightforward.

I have used the workaround to achieve this task. There is no guarantee it will continue to work in futuere versions. It depends on whether the old terminal settings page isn't removed from the app bundle and if the app doesn't stop loading the old config. As of Chrome OS 113, it is still working.

  1. Open the old terminal settings page, as it allows more customizations:

    chrome-untrusted://terminal/html/nassh_preferences_editor.html

  2. Once there, add the following custom CSS on the field labeled "Custom CSS (inline text)":

@josemarcosrf
josemarcosrf / keybase.md
Created June 14, 2024 09:03
KeyBase Proof

Keybase proof

I hereby claim:

  • I am josemarcosrf on github.
  • I am random_walker (https://keybase.io/random_walker) on keybase.
  • I have a public key ASB5t9nYHhZt9DiwNDCWMDcES7HFvhlXrJIX-layYtyWWgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am josemarcosrf on github.
  • I am jose_mrf (https://keybase.io/jose_mrf) on keybase.
  • I have a public key ASCjkcf9SpDqCDc5VrtBCC5EzQNUsn1HEBlYjeqaefmkngo

To claim this, I am signing this object:

@josemarcosrf
josemarcosrf / ble_client.py
Last active February 14, 2024 18:06
python BLE server & client using pybluez
import click
import json
import logging
import sys
import bluetooth as bt
import coloredlogs
from typing import *
@josemarcosrf
josemarcosrf / nvidia-time-slicing.md
Last active November 13, 2023 20:11
Instructions on installing nvidia-time-slicing in kubernetes
  1. Define the time-slicing configuration.

    a. Create a file called time-slicing-config-all.yaml with the following contents:

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: time-slicing-config-all
    data:
@josemarcosrf
josemarcosrf / minimal_celery_worker_example.py
Last active October 26, 2023 16:00
A minimal celery worker client example
import fire
import pika
import redis
import os
from typing import Any
from typing import Dict
from typing import List
from typing import Tuple
import celery
@josemarcosrf
josemarcosrf / pdf_mine_with_boxes.py
Last active October 10, 2023 13:25
Quick and dirty implementation of a text and bounding box extraction from PDFs using pdfminer.six==20191110
from collections import defaultdict
import fire
from pdfminer.converter import PDFPageAggregator
from pdfminer.layout import LAParams
from pdfminer.layout import LTChar
from pdfminer.layout import LTTextBox
from pdfminer.layout import LTTextLine
from pdfminer.pdfinterp import PDFPageInterpreter
from pdfminer.pdfinterp import PDFResourceManager