Skip to content

Instantly share code, notes, and snippets.

View vicente-gonzalez-ruiz's full-sized avatar

Vicente González Ruiz vicente-gonzalez-ruiz

View GitHub Profile
@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / bwt.py
Last active March 18, 2025 07:38 — forked from dmckean/bwt.py
A simple Burrows-Wheeler transform function in python
#! /usr/bin/env python
"""
A simple Burrows-Wheeler transform function in python.
Algorithm presented in:
Burrows M, Wheeler DJ: A Block Sorting Lossless Data Compression Algorithm.
Technical Report 124. Palo Alto, CA: Digital Equipment Corporation; 1994.
USAGE: bwt.py [-h] [-i INDEX] STRING
"""
@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / Solar_Ortiter_Data stuff
Last active December 27, 2017 19:05
Shell command for converting data
for i in *.zip; do echo $i; unzip $i; done
for i in *.tiff; do echo $i; convert $i $i.YUV; done
display -size 4096x4096 -depth 8 YUV:171_20120104_120700.tiff.Y
@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / manjaro_kernel.md
Last active February 5, 2023 19:37
Adding new kernel in Manjaro

Installing a new kernel in Manjaro

There are several alternatives:

  1. Download a pre-compiled kernel from the Manjaro repos.
  2. Download a source kernel from the Manjaro repos and compile it. This should optimize the binaries for your chipset.
  3. Download a source kernel from https://www.kernel.org/ and compile it. Optimized, but harder to configure :-/

1. Using a pre-compiled kernel:

See https://wiki.manjaro.org/index.php/Manjaro_Kernels

# Check the current driver (probably nouveau):
inxi -G
Graphics:
Device-1: Intel 4th Generation Core Processor Family Integrated Graphics
driver: i915 v: kernel
Device-2: NVIDIA GK104 [GeForce GTX 760] driver: nouveau v: kernel
Display: x11 server: X.Org 1.20.7 driver: intel,nouveau
unloaded: modesetting tty: N/A
OpenGL: renderer: NVE4 v: 4.3 Mesa 19.3.5
@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / enable_disable_service.txt
Last active March 27, 2020 13:20
How to get the status, enable and disable a service in Linux
# See: https://wiki.archlinux.org/index.php/systemd
# List running services:
systemctl list-units
systemctl list-units | grep service
# List all available services (running or not):
systemctl list-unit-files
@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / mount_recalbox.sh
Last active April 25, 2020 10:37
How to mount the recalbox filesystem using Samba
# mkdir recalbox
sudo mount -t cifs //recalbox.local/share recalbox/ -o user=samba,password=password,uid=1000,gid=1001,rw
retroarch -v -L ./snap/retroarch/current/.config/retroarch/cores/mame2003_libretro.so recalbox/roms/mame/A/atetris.zip
@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / install_retroarch.sh
Last active April 25, 2020 17:23
Install retroarch in Manjaro
# https://snapcraft.io/install/retroarch/manjaro#install
sudo pacman -S snapd
sudo systemctl enable --now snapd.socket
sudo ln -s /var/lib/snapd/snap /snap
sudo snap install retroarch
retroarch
# Install cores
# Remove
sudo snap remove retroarch
# https://realpython.com/emacs-the-best-python-editor/
# https://melpa.org/#/getting-started
cat > $HOME/.emacs << EOF
;; ===================================
;; MELPA Package Support
;; ===================================
;; Enables basic packaging support
(require 'package)
@vicente-gonzalez-ruiz
vicente-gonzalez-ruiz / emacs_elpy.md
Last active February 17, 2023 07:42
Emacs + elpy