Skip to content

Instantly share code, notes, and snippets.

View rodrigopedra's full-sized avatar

Rodrigo Pedra Brum rodrigopedra

  • São Carlos, Brazil
View GitHub Profile
@rodrigopedra
rodrigopedra / javascript_engines_and_runtimes.md
Created October 11, 2024 03:43 — forked from guest271314/javascript_engines_and_runtimes.md
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@rodrigopedra
rodrigopedra / OpenSuSE_MicroOS_ROCm_CUDA_ollama.md
Created September 18, 2024 01:18 — forked from torsten-online/OpenSuSE_MicroOS_ROCm_CUDA_ollama.md
OpenSUSE MicroOS Howto with AMDGPU / ROCm - To run CUDA AI Apps like Ollama

Howto run Ollama "local AI" with ROCm on OpenSUSE Tumbleweed / MicroOS / AEON Desktop with AMDGPU / ROCm

ITs just totally easy to install amdgpu-dkms kernel driver with ROCm/AMDGPU on OpenSUSE Tumbleweed or better MicroOS/AEON, if you know what to do...

  • Install Longtime Kernel Support + Devel Packages
sudo transactional-update --continue pkg install kernel-longterm kernel-longterm-devel
@rodrigopedra
rodrigopedra / sw-test-cleaup.js
Created April 22, 2024 05:02 — forked from gauntface/sw-test-cleaup.js
Function to unregister SW and clear out old caches.
window.__testCleanup = () => {
const unregisterSW = () => {
return navigator.serviceWorker.getRegistrations()
.then((registrations) => {
const unregisterPromise = registrations.map((registration) => {
return registration.unregister();
});
return Promise.all(unregisterPromise);
});
};
@rodrigopedra
rodrigopedra / cap.sh
Created November 23, 2023 21:35 — forked from patillacode/cap.sh
#!/bin/bash
################################################################################
# cap - capture your screen
#
# This script allows you to capture your screen on Linux or macOS systems using
# the appropriate tools available on each platform. On Linux, it uses 'slop'
# and 'ffmpeg', while on macOS, it utilizes 'screencapture'. The script prompts
# you to select a desktop area for recording and saves the recording as an MP4/MOV
# file with customizable video quality.
@rodrigopedra
rodrigopedra / peek.sh
Created November 23, 2023 21:32 — forked from jpenalbae/peek.sh
Record desktop area on linux using slop and ffmpeg
#!/bin/bash
# Video Quality
# The range of the CRF scale is 0–51, where 0 is lossless, 23 is the default,
# and 51 is worst quality possible. A lower value generally leads to higher
# quality, and a subjectively sane range is 17–28
QUALITY=28
# check if slop command exists
if ! command -v slop &> /dev/null
@rodrigopedra
rodrigopedra / vidqgif.sh
Created November 23, 2023 21:27 — forked from bodqhrohro/vidqgif.sh
Compress a video to a tiny GIF with a very strong quantization and no dithering
#!/bin/sh
# parameters: input, output
# make a 256-colors palette first
palettefull=$( mktemp --suffix=.png )
ffmpeg -i "$1" -vf 'palettegen' -y "$palettefull"
# quantize the palette (palettegen's builting limiter
# tries to preserve too much similar shades)
palettequant=$( mktemp --suffix=.png )
@rodrigopedra
rodrigopedra / README.md
Last active November 11, 2023 22:13
Generate Breeze opaque local Plasma Styles

Generate Breeze opaque local Plasma Styles

Tested on Plasma 5.27

I understand many people like transparency and blur, and many folks I introduced to Plasma, made the switch by features like that.

But for me, it is highly distracting, and a big focus grabber.

I spent countless hours looking for a solution to this, and pushed every knob

@rodrigopedra
rodrigopedra / toggle-decorations.c
Created October 23, 2023 18:51 — forked from muktupavels/toggle-decorations.c
Simple app to toggle window decorations.
/*
* Copyright (C) 2017 Alberts Muktupāvels
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
<?php
/**
* PHP XML to dynamic table
*
* @link http://stackoverflow.com/q/16997835/367456
*/
require('.../Iterator-Garden/src/autoload.php'); // for DecoratingIterator - use development branch
@rodrigopedra
rodrigopedra / BladeServiceProvider.php
Last active December 8, 2022 09:47
Blade Optimizations
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\View\Compilers\BladeCompiler;
// @see https://laravel-news.com/faster-laravel-optimizations
class BladeServiceProvider extends ServiceProvider
{