Skip to content

Instantly share code, notes, and snippets.

View alt-romes's full-sized avatar
🦖

Rodrigo Mesquita alt-romes

🦖
View GitHub Profile
@alt-romes
alt-romes / srcpkgs-picom-template
Last active September 18, 2021 19:53
xbps-src package to install latest non-numerical release (vNext) of the yshui/picom compositor -- see void-linux/void-packages
# Template file for 'picom'
pkgname=picom
version=9
revision=1
build_style=meson
configure_args="-Dwith_docs=true"
hostmakedepends="pkg-config asciidoc"
makedepends="MesaLib-devel dbus-devel libconfig-devel libev-devel pcre-devel
pixman-devel xcb-util-image-devel xcb-util-renderutil-devel
libxdg-basedir-devel uthash"
@alt-romes
alt-romes / (errors workaround) wal.vim
Last active August 29, 2021 10:11
lightline wal colorscheme -- errors workaround
" =============================================================================
" Filename: autoload/lightline/colorscheme/wal.vim
" Author: Dylan Araps
" License: MIT License
" Last Change: 2017/10/28 12:21:04.
" =============================================================================
source $HOME/.cache/wal/colors-wal.vim
let s:black = [ color0, 232 ]
@alt-romes
alt-romes / system-zero-setup.sh
Last active September 18, 2021 00:50
Mirrors system-zero-setup private file to a public gist
#!/usr/bin/env bash
# ----- --- -----
echo "Installing developer command line tools..."
xcode-select --install
echo "Installing Homebrew..."
if ! command -v brew >/dev/null 2>&1; then
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)";
@alt-romes
alt-romes / pointers.c
Created March 9, 2021 20:12
Example program to explain pointers to a friend
#include <stdio.h>
int main(int argc, char *argv[]) {
int arr[10];
int * arrptr;
int x;
int * xptr;
@alt-romes
alt-romes / logtime.sh
Last active March 8, 2021 10:52
Simple program to count and log work time to a time log
#!/usr/bin/env python3
# Log Time:
# logtime.sh work 1h30m
# This will add an entry to the file in $logfilename of type "work: 1h30m" under the header for the day
#
# Usage suggestion:
# Dependencies: termdown @ https://github.com/trehn/termdown
# Bash Function:
# tasktimer(){
@alt-romes
alt-romes / getminecraftitemsdata.py
Created May 18, 2020 12:01
Script to get all items from minecraft and print them as SQL insert commands
import requests
allitemsHTML = requests.get('https://minecraft-ids.grahamedgecombe.com/').text
import re
items = re.findall('class="name">(.*?)<.*?class="text-id">\((.*?)\)</', allitemsHTML)
for i in range(len(items)):
print('item id {}, item name {}, item type {}'.format(i, items[i][0], items[i][1]))
<tr valign=top class=><td align=right class=note >4338</td><td > <a href="https://embed.spotify.com/?uri=spotify:playlist:59TVx2MmmBfg0BqRc7CvqM" class=note target=spotify title="See this playlist" onclick="linksync('https://embed.spotify.com/?uri=spotify:playlist:59TVx2MmmBfg0BqRc7CvqM');">&#x260A;</a></td><td class=note ><a href="?root=ugandan%20traditional&scope=all" title="Re-sort the list starting from here." style="color: #668C2F">ugandan traditional</a></td></tr>
<tr valign=top class=><td align=right class=note >4339</td><td > <a href="https://embed.spotify.com/?uri=spotify:playlist:6PJCol5gHpuhFsPNKBsbuD" class=note target=spotify title="See this playlist" onclick="linksync('https://embed.spotify.com/?uri=spotify:playlist:6PJCol5gHpuhFsPNKBsbuD');">&#x260A;</a></td><td class=note ><a href="?root=trallalero&scope=all" title="Re-sort the list starting from here." style="color: #4F8B07">trallalero</a></td></tr>
<tr valign=top class=><td align=right class=note >4340</td><td > <a href="https://embed.s
@alt-romes
alt-romes / musicoutput.sql
Created May 18, 2020 10:38
the output of the getmusicdata.py gist
insert into MusicGenres values ("pop");
insert into MusicGenres values ("dance pop");
insert into MusicGenres values ("rap");
insert into MusicGenres values ("post-teen pop");
insert into MusicGenres values ("pop rap");
insert into MusicGenres values ("rock");
insert into MusicGenres values ("latin");
insert into MusicGenres values ("hip hop");
insert into MusicGenres values ("trap");
insert into MusicGenres values ("modern rock");
@alt-romes
alt-romes / getmusicdata.py
Last active May 18, 2020 10:36
Get all music genres from everynoise.com and create insert commands
import requests
everynoisetext = requests.get('http://everynoise.com/everynoise1d.cgi?scope=all').text
import re
allgenres = re.findall(r'style="color: #.*?>(.*?)<', everynoisetext)
for genre in allgenres:
print ('insert into MusicGenres values ("{}");'.format(genre))