Skip to content

Instantly share code, notes, and snippets.

View franzbischoff's full-sized avatar
I were here

Francisco Bischoff franzbischoff

I were here
View GitHub Profile
@franzbischoff
franzbischoff / fix-permissions.sh
Created March 14, 2024 14:13 — forked from x3rAx/fix-permissions.sh
Shell script to easily fix permissions recursively on files and directories (Set user / group / file mode / dir mode)
#!/usr/bin/env bash
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# MIT License
#
# Copyright (c) 2019 Björn Richter
#
# 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
@franzbischoff
franzbischoff / docker.bash
Created October 5, 2023 18:44
Useful Docker Aliases
#!/usr/bin/bash
# Source of sources: https://github.com/tribal2/dotfiles/blob/master/bash_/docker.bash
# sources
# https://gist.github.com/jgrodziski/9ed4a17709baad10dbcd4530b60dfcbb
# https://gist.github.com/mspronk/cab0c175b876ef662e25b1ba2d22b069
function help-fn {
cat <<EOF
@franzbischoff
franzbischoff / gist:93d6b14b1c3ad9fc3b1f4fc0d3b3ad47
Created September 25, 2023 10:18 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@franzbischoff
franzbischoff / dlpo.ubiquity.js
Created July 11, 2023 15:03 — forked from BrunoCaimar/dlpo.ubiquity.js
DLPO - Dicionário Priberam de Lingua Portuguesa On-Line - Ubiquity command
CmdUtils.CreateCommand({
names: ["dlpo"],
icon: "http://www.priberam.pt/favicon.ico",
description: "DLPO - Dicionário Priberam de Lingua Portuguesa On-Line v0.0.3.20090917",
help: "Procura a definição da palavra informada no DLPO - Dicionário Priberam de Língua Portuguesa On-Line (http://www.priberam.pt/dlpo/)",
author: {
name: "Bruno Caimar",
email: "bruno.caimar@gmail.com"
},
license: "MIT",
@franzbischoff
franzbischoff / GitHubCopilotCLIAlias.ps1
Created May 26, 2023 03:26 — forked from MattJeanes/GitHubCopilotCLIAlias.ps1
Alias commands to use GitHub Copilot CLI in PowerShell
# You should insert this script into your PowerShell Profile script so it exists in every session
# Fun fact: This script was mostly generated by ChatGPT by giving it the bash version of the output
# from `github-copilot-cli alias -- "$0"` with a few fixes from me
function Invoke-CopilotWhatTheShell {
$TMPFILE = New-TemporaryFile;
try {
github-copilot-cli what-the-shell $args --shellout $TMPFILE
if ($LASTEXITCODE -eq 0) {
@franzbischoff
franzbischoff / docker_allowlist.txt
Last active April 15, 2023 11:02
AdGuard Allowlists
@@||api.segment.io^
@@||cdn.segment.com^
@@||api.wootric.com^
@@||cdn.wootric.com^
@@||notify.bugsnag.com^
@@||sessions.bugsnag.com^
@@||auth.docker.io^
@@||cdn.auth0.com^
@@||login.docker.com^
@@||desktop.docker.com^
{"name":"anymapp","hostname":"BISCHOFF-wsl","pid":37886,"level":30,"event":{"message":"logEvent","data":{"elementID":"u1","eventInfo":{"dragInfo":{},"item":{"valid":false},"keyInfo":{"ctrl":false,"alt":false,"shift":false,"keyCode":0},"pageX":"577px","pageY":"731px","srcElement":"u1","window":{"width":795,"height":1096,"scrollx":0,"scrolly":0}},"eventType":"Click or Tap","path":["2083d309e6664fa28fb78a592c3051ea"],"timeStamp":1669042256891}},"msg":"logEvent","time":"2022-11-21T14:50:57.236Z","v":0}
@franzbischoff
franzbischoff / turn_off_leds.sh
Created July 26, 2022 11:52
Cubietruck tricks
#!/bin/bash
# Description:
# This turns off all the annoying leds that makes your cubietruck looks like a christmas tree
# original from https://karellen.blogspot.com/2015/07/turning-off-leds-on-cubietruck.html
find /sys/devices/platform/leds-sunxi/ -name "brightness" | sed s'/:/\\:/g' | while read l; do echo 0 > "$l"; done
@franzbischoff
franzbischoff / fixtailscale.sh
Last active April 2, 2022 09:30
Tailscale hack on homeassistant official addon for creating and updating SSL certificates
#!/bin/bash
# disclaimer: I did it for personal use, no garantees
# this version doesn't check if the script was already runned. Nothing bad happens anyway.
# first you need to have the "reconfig.sh" inside the addon container. If you are just updating the container,
# the data folder usually stays there with the script.
dockerssl="/data/ssl"
localssl="/root/ssl/tailscale"
@franzbischoff
franzbischoff / fluss_score_tests.R
Last active April 25, 2022 20:36
Experiment of FLUSS scores
# Create the GT and predictions
set.seed(2022)
ts_length <- 1000
n_points <- 10
truth <- sort(round(runif(n_points, 1, ts_length), 0))
min_diff <- min(abs(diff(truth)))
mask <- runif(n_points) > 0.5
reported_equal <- truth + round(runif(n_points, -min_diff / 2, min_diff / 2), 0)
reported_half <- reported_equal[mask]
reported_half_rand <- sort(round(runif(floor(n_points / 2), 1, ts_length), 0))