Skip to content

Instantly share code, notes, and snippets.

View jasaldivara's full-sized avatar

Jesús Abelardo Saldívar Aguilar jasaldivara

View GitHub Profile
@DavidBuchanan314
DavidBuchanan314 / widevine_fixup.py
Last active July 15, 2025 03:43
Patch aarch64 widevine blobs from ChromeOS to work on non-ChromeOS linux, including platforms with 16K page size like Apple Silicon / Asahi Linux
"""
MIT License
Copyright (c) 2023 David Buchanan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE language SYSTEM "language.dtd">
<!--Based on the language defintion shared on:
https://wiki.gnome.org/Projects/GtkSourceView/LanguageDefinitions?action=AttachFile&do=view&target=asm-intel.lang
-->
<language id="assembler" name="Assembler (Intel)" version="2.0" section="Sources">
<metadata>
<property name="mimetypes">text/x-asm;text/x-assembler</property>
<property name="globs">*.asm</property>
</metadata>
@bellbind
bellbind / index.html
Last active June 17, 2025 23:35
[chrome][android] BarcodeDetector example
<!doctype html>
<html>
<head>
<script type="module">
// WICG Shape Detection API
// - https://wicg.github.io/shape-detection-api/
try {
const start = document.getElementById("start");
const video = document.getElementById("video");
const result = document.getElementById("result");
@fnky
fnky / ANSI.md
Last active November 2, 2025 14:27
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@ruario
ruario / 1-README.md
Last active September 6, 2025 14:45
A script that fetches a ChromeOS image for ARM32 and extracts the Widevine binary, saving it in a compressed archive for use with Vivaldi

The included script 'widevine-flash_armhf.sh' fetches a ChromeOS image for ARM and extracts the Widevine binary, saving it in a compressed archive. Since it downloads a fairly large file (2Gb+ on disk after download) it is recommended that you run the script on a machine that has plenty of disk space.

To install the resultant archive, issue the following on your ARM machine–after copying over the archive if needed:

sudo tar Cfx / widevine-flash-20200124_armhf.tgz

(Where 'widevine-flash-20200124_armhf.tgz' is updated to reflect the actual name of the created archive)

@jarun
jarun / fish_noti.md
Last active May 6, 2025 05:35
notification on command completion (fish shell)

Instead of waiting for long commands to finish one can easily get notifications when they are complete. The following procdure shows how to set his in fish shell.

Requirements: fish shell, notify-send, xdotool

  • Add a new file vi ~/.config/fish/functions/noti.fish with the content below:
function fish_right_prompt
    if test $CMD_DURATION
 # Check if terminal window is hidden
@voldyman
voldyman / CellRenderer-treeview.vala
Last active October 17, 2021 18:56
This file shows how to use a custom cell renderer in a Gtk Treeview to build complex layouts
class MyCellRenderer : Gtk.CellRenderer {
// icon property set by the tree column
public Gdk.Pixbuf icon { get; set; }
public string text { get; set; }
public int progress { get; set; }
public int Padding;
private Gtk.CellRendererPixbuf icon_renderer;
private Gtk.CellRendererText text_renderer;
@d11wtq
d11wtq / docker-ssh-forward.bash
Created January 29, 2014 23:32
How to SSH agent forward into a docker container
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
@jpouellet
jpouellet / zbell.sh
Last active October 21, 2025 14:13
Makes Zsh print a bell when long-running commands finish. I use this in combination with i3 and throw big compile jobs (or whatever it may be) into another workspace to get a nice visual notification (workspace indicator turns red) when it's done so I don't need to waste time regularly checking on it.
#!/usr/bin/env zsh
# This script prints a bell character when a command finishes
# if it has been running for longer than $zbell_duration seconds.
# If there are programs that you know run long that you don't
# want to bell after, then add them to $zbell_ignore.
#
# This script uses only zsh builtins so its fast, there's no needless
# forking, and its only dependency is zsh and its standard modules
#
@dansouza
dansouza / gist:3757165
Created September 20, 2012 17:19
Lua prettyprinter
#!/usr/bin/env lua
-- works like PHP's print_r(), returning the output instead of printing it to STDOUT
function prettyprint(data)
-- cache of tables already printed, to avoid infinite recursive loops
local tablecache = {}
local buffer = ""
local padder = " "
local inited = 0