Skip to content

Instantly share code, notes, and snippets.

View rubensa's full-sized avatar
💭
¯\(°_o)/¯ ¯\_(ツ)_/¯

Ruben Suarez Alvarez rubensa

💭
¯\(°_o)/¯ ¯\_(ツ)_/¯
View GitHub Profile
@rubensa
rubensa / OpenBSDBCryptPasswordEncoder.java
Last active May 18, 2018 12:15
Implementation of Spring PasswordEncoder that uses Bouncy Castle OpenBSDBCrypt.
/*
* Copyright 2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@rubensa
rubensa / ttf-vista-fonts-installer.sh
Created September 9, 2020 06:23 — forked from maxwelleite/ttf-vista-fonts-installer.sh
Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install Microsoft Vista TrueType Fonts (TTF) aka Microsoft’s ClearType fonts on Ubuntu distros
# Microsoft added a group of new "ClearType Fonts" to Windows with Windows Vista and Office 2007.
# These fonts are named Constantia, Corbel, Calibri, Cambria (and Cambria Math), Candara, and Consolas.
# Calibri became the default font on Microsoft Word 2007, and it’s still the default font on Word 2016 today.
# Dependencies: wget, fontforge and cabextract
# Note: Microsoft no longer provides the PowerPoint Viewer 2007 (v12.0.4518.1014) or any version anymore for download
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
@rubensa
rubensa / ttf-ms-tahoma-installer.sh
Created September 9, 2020 06:25 — forked from maxwelleite/ttf-ms-tahoma-installer.sh
Script to install the original Microsoft Tahoma font on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install the original Microsoft Tahoma Regular and MS Tahoma Bold (both version 2.60) on Ubuntu distros.
# Dependencies: wget and cabextract
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
output_dir="/usr/share/fonts/truetype/msttcorefonts/"
tmp_dir="/tmp/ttf-ms-tahoma-installer"
@rubensa
rubensa / ttf-wine-tahoma-installer.sh
Created September 9, 2020 06:27 — forked from maxwelleite/ttf-wine-tahoma-installer.sh
Script to install the latest Wine Tahoma fonts on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install the latest Wine Tahoma Regular and Wine Tahoma Bold fonts on Ubuntu distros from the Wine Project.
# The Wine project includes the free and open-source fonts Wine Tahoma Regular and Wine Tahoma Bold released under LGPL
# designed to have identical metrics to the Microsoft Tahoma font. This was done because Tahoma is available by default
# on Windows, and many applications expect the font to be available.
# Dependencies: wget
# Tested: Ubuntu Saucy/Trusty/Xenial
@rubensa
rubensa / kubernetes.md
Created December 9, 2021 11:17 — forked from sonoroot/kubernetes.md
kubernetes notes

Kubernetes Notes

Busybox Debug

kubectl run busybox --image=busybox:1.28 --rm -it --restart=Never -- sh
kubectl run test --image=alpine:latest --rm -it --restart=Never -- sh
@rubensa
rubensa / uncheck-checkboxes.js
Last active December 14, 2021 05:35
Chrome DevTools Snippet to click on an element and uncheck all contained checkboxes.
// uncheck-checkboxes.js
// https://gist.github.com/rubensa/5128d5c8b85eb82ca970d89222693128
// Chrome DevTools Snippet to click on an element and uncheck all contained checkboxes.
// Starting Firefox 72, you can import a Javascript file content in the console input with Ctrl + O (Cmd + O on macOS), as well as saving the console input content to a file using Ctrl + S (Cmd + S on macOS).
(function() {
function uncheckCheckboxes(e) {
e.preventDefault();
e.stopPropagation();
window.removeEventListener('mousedown', uncheckCheckboxes, true);

Configure systemd-resolved to use a specific DNS nameserver for a given domain

Use case

Given

  • I use a VPN to connect to my work network
  • I'm on a Linux computer that uses systemd-resolved
  • I have a work domain called example.com
  • example.com is hosted by both public and private DNS nameservers
@rubensa
rubensa / pipewire.md
Created April 1, 2022 18:46 — forked from the-spyke/pipewire.md
Enable PipeWire on Ubuntu 21.10

Enable PipeWire on Ubuntu 21.10

Ubuntu 21.10 has PipeWire partially installed and enabled as it's used by browsers (WebRTC) for recoding the screeen under Wayland. We can enable remaining parts and use it for audio and Bluetooth instead of PulseAudio.

This guide is only for original Ubuntu out-of-the-box packages. If you have added a custom PPA, you might get into conflicts.

Based on the Debian Wiki, but adopted for Ubuntu 21.10.

Install

@rubensa
rubensa / gist:407de76194d27f763cd5e8bd235fdd5d
Last active June 30, 2022 08:43 — forked from tinogomes/DNS_TO_LOCALHOST.markdown
Public DNS Pointing To localhost (127.0.0.1)

Available Wildcarded DNS Domains

It turns out that some kind hearted people already set up wildcarded domains for you already. You can use any top level domain below and any subdomain of these and they will always resolve back to 127.0.0.1 (your local machine). Here's the list of ones I know about. Let me know if there are more!

  • 127-0-0-1.org.uk
  • 42foo.com
  • beweb.com
  • domaincontrol.com
  • feacebook.com
  • lacolhost.com
@rubensa
rubensa / private_fork.md
Created September 7, 2022 12:30 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git