Skip to content

Instantly share code, notes, and snippets.

View rodrigo-sys's full-sized avatar

rodrigo-sys

View GitHub Profile
@tejaswini-dev-techie
tejaswini-dev-techie / animated_count_down_timer.dart
Created November 15, 2024 08:29
Building a Countdown Timer in Flutter
import 'dart:async';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);

🔰 A beginners guide to create custom cmdline

showcase

Ever wanted to know how noice creates the cmdline or wanted your own one?

No one? Guess it's just me 🥲.

Anyway, this post is a simple tutorial for creating a basic cmdline in neovim.

@cy6erGn0m
cy6erGn0m / Main.kt
Last active December 26, 2024 17:41
kotlin-native-libssh
import kotlinx.cinterop.*
import org.ssh.*
fun main(): Unit = memScoped {
val session = ssh_new() ?: return
val port = alloc<IntVar>()
port.value = 22
val verbosity = alloc<UIntVar>()
verbosity.value = SSH_LOG_PROTOCOL
@m-bartlett
m-bartlett / README.md
Created December 14, 2021 21:59
i3 ipc script to allow breadth-first movement for moving focus between highly nested containers.

i3-focus-skip-tabs

This parses the i3 workspace tree from the i3 IPC to execute focus commands on the outermost tabbed container that has 1+ siblings. If such a container is not found in the hierarchy up from the focused window to the root container then this will call a regular focus command. In theory this script can take any valid arguments that the i3 command focus takes (e.g. prev and next, etc.), however it has only been tested with leftandright.

The idea is this will move focus between the highest level containers without requiring several focus parent commands if working with highly nested containers.

Demo

The following video demo is running with the following keybinds, i.e. the "normal" keybind to change focus instead runs this script with super+alt+(left/right) being a fallback to normal focus (left/right.

@bitingsock
bitingsock / ytdl-preload.lua
Last active September 26, 2025 14:13
Precache the next entry in your playlist if it is a network source by downloading it to a temp file ahead of time. Change Line 20 to temp directory. It will delete the directory on exit.
----------------------
-- #example ytdl_preload.conf
-- # make sure lines do not have trailing whitespace
-- # ytdl_opt has no sanity check and should be formatted exactly how it would appear in yt-dlp CLI, they are split into a key/value pair on whitespace
-- # at least on Windows, do not escape '\' in temp, just us a single one for each divider
-- #temp=R:\ytdltest
-- #ytdl_opt1=-r 50k
-- #ytdl_opt2=-N 5
-- #ytdl_opt#=etc
@salman-abedin
salman-abedin / launch.sh
Last active June 10, 2025 21:24
XDG Alternative
#!/bin/sh
#
# Launches files based on their mimetypes
# Usage: launch [FILE...]
# Dependencies: file
case $(file --mime-type "$@" -bL) in
# Check for the mimetype of your file (This is POSIX regex)
video/* | audio/* | image/gif)
# Launch using your favorite application
@aldemirenes
aldemirenes / android_build_run.sh
Last active September 19, 2024 14:34
Shell scripts for Android development without needing to use Android Studio
#!/bin/sh
package_name=$1
./gradlew assembleDebug
adb -d install -r app/build/outputs/apk/app-debug.apk
adb shell monkey -p "$package_name" -c android.intent.category.LAUNCHER 1
./logcat.sh "$package_name"
@tung
tung / twitch-vod-chat.py
Last active June 11, 2025 20:10
Download chat from a Twitch VOD and print it to a terminal.
#!/usr/bin/env python3
#
# A script to download chat from a Twitch VOD and print it to a terminal.
# Chat will be downloaded all the way until it ends.
#
# Usage: TWITCH_CLIENT_ID=0123456789abcdef0123456789abcde twitch-vod-chat.py [video_id] [start]
#
# This script could break at any time, because Twitch's chat API is
# undocumented and likes to change at any time; in fact, this script was
@avih
avih / context.lua
Created February 2, 2017 14:07
flexible mpv context menu using Tcl/Tk, for Windows too!
--[[ *************************************************************
* Context menu for mpv using Tcl/Tk. Mostly proof of concept.
* Avi Halachmi (:avih) https://github.com/avih
*
* Features:
* - Simple construction: ["<some text>", "<mpv-command>"] is a complete menu item.
* - Possibly dynamic menu items and commands, disabled items, separators.
* - Possibly keeping the menu open after clicking an item (via re-launch).
* - Hacky pseudo sub menus. Really, this is an ugly hack.
* - Reasonably well behaved/integrated considering it's an external application.