Skip to content

Instantly share code, notes, and snippets.

View rmdes's full-sized avatar
💭
Learning, Groking, Exploring

Ricardo rmdes

💭
Learning, Groking, Exploring
View GitHub Profile
@rmdes
rmdes / how_to_manage_python_on_fedora.md
Last active May 29, 2024 16:25 — forked from tchamberlin/how_to_manage_python_on_fedora.md
How to manage Python and related tooling on Fedora 39

Dev Dependencies

sudo dnf groupinstall "Development Tools"
sudo dnf install gcc zlib-devel bzip2 bzip2-devel readline-devel sqlite sqlite-devel openssl-devel tk-devel libffi-devel xz-devel

How to manage Python via pyenv and pipx on Fedora 40

@rmdes
rmdes / reclaimWindows10.ps1
Created April 3, 2024 09:31 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@rmdes
rmdes / verifyKeytab
Created March 18, 2024 14:24 — forked from incepttechnologies/verifyKeytab
Verify keytab files
The contents of keytab file can be verified using either Unix/linux ktutil or klist commands or java ktab utility.
(1)
-bash-3.2$ ktutil
ktutil: rkt krba01.keytab
ktutil: list
slot KVNO Principal
---- ---- ------------------------------------------------------------------------------------------------
@rmdes
rmdes / .gitconfig
Last active March 15, 2024 14:54 — forked from pksunkara/config
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Ricardo Mendes
email = rick@armada.digital
username = rmdes
[init]
defaultBranch = main
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta
@rmdes
rmdes / fonctions.js
Last active February 20, 2023 20:02
Alternative "is it new" for the old function node block for N8N
const new_items = [];
const data = this.getWorkflowStaticData('node');
data.ids = data.ids || [];
for (var i=0; i<items.length; i++) {
if (data.ids.includes(items[i].json.id)) {
break;
} else {
new_items.push({json: {id: items[i].json.id, url: items[i].json.url, name: items[i].json.name}});
@rmdes
rmdes / function.js
Created February 20, 2023 19:21
is it new function block with the old Function node N8N
const staticData = getWorkflowStaticData('global');
const newRSSIds = items.map(item => item.json["Date"]);
const oldRSSIds = staticData.oldRSSIds;
if (!oldRSSIds) {
staticData.oldRSSIds = newRSSIds;
return items;
}
const new_items = [];
const key_field = "guid";
console.log("key_field from json.key: " + key_field);
const now = $now
// Get static data stored with the workflow
data = $getWorkflowStaticData("node");
// delete the old cache, that didn't have time
data.ids = null;
@rmdes
rmdes / function.js
Created February 20, 2023 12:31
Naej Doree RSS feed function node
const staticData = $getWorkflowStaticData('node');
latestRead = staticData.latestRead || new Date('2023-02-19');
nextLatest = latestRead;
var recentItems = []
for (let item of items) {
var currentDate = new Date(item.pubDate);
if(currentDate > latestRead) {
recentItems.push(item);
@rmdes
rmdes / i3-cheat-sheet
Created February 16, 2022 10:53
Some keyboard shortcuts to use i3
# i3 Window Manager Cheat Sheet
`$mod` refers to the modifier key (alt by default)
## General
* `startx i3` start i3 from command line
* `$mod+<Enter>` open a terminal
* `$mod+d` open dmenu (text based program launcher)
* `$mod+r` resize mode (<Esc> or <Enter> to leave resize mode)
* `$mod+shift+e` exit i3
@rmdes
rmdes / release.yml
Created February 9, 2022 13:14 — forked from jimcavoli/release.yml
GitHub Actions workflows for custom Cloudron Apps
# Custom Cloudron App build/update workflow
#
# To use this template, ensure the following secrets
# * DOCKER_USERNAME
# * A Docker Hub account username
# * DOCKER_PASSWORD
# * The Docker Hub password for DOCKER_USERNAME
# * DOCKER_REPONAME
# * The repository belonging to DOCKER_USERNAME to push updates to
# * CLOUDRON_HOST