Skip to content

Instantly share code, notes, and snippets.

View luismtorresv's full-sized avatar
🌹

Luis M. Torres V. luismtorresv

🌹
  • Medellín, Colombia
  • 05:15 (UTC -05:00)
View GitHub Profile
@alejoriosm04
alejoriosm04 / binaryTree.py
Created October 27, 2022 02:25
Python script to test the behavior of a binary tree
"""
Test the behavior of a binary tree
Written in Python by Alejandro Ríos
For the course "Data Structures and Algorithms I" at EAFIT University
- Links the functions and classes of binaryTree.py with your main file
- Prints your Binary Tree in the console
- Create a Binary Tree from scratch and see the output from your modifications
@luismtorresv
luismtorresv / RecursiveSmallestInteger2DArray.java
Last active November 6, 2022 17:14
Recursively find smallest integer in 2D array (Java). Disclaimer: This program does not really make sense.
/**
* Find the smallest integer in a 2D array.
* This program does not really make sense.
*
* @author Luis M. Torres-Villegas
* @version 2022.11.05
*/
public class RecursiveSmallestInteger2DArray {
public static void main(String args[]) {
gen-username() {
vowel() {
head /dev/urandom | tr -dc 'aeiueoy' | cut -c1
}
consonant() {
head /dev/urandom | tr -dc 'qwrtpsdfghjklzxcvbnm' | cut -c1
}
digit() {
head /dev/urandom | tr -dc '[:digit:]' | cut -c1
}
@yomli
yomli / install-wallabag.md
Last active July 9, 2024 00:40
Install Wallabag on a shared web hosting in a subfolder with SQLite

Update April 2021: See this comment for a smoother install of Wallabag 2.4.x. I'll leave this gist up for legacy.


Please note that this trick works with the latest release of Wallabag (2.3.7). There is no guarantee that it'll continue to work. Eventually, Wallabag will drop support of SQLite so this setup isn't future-proof.

Install Wallabag 2.2.3

This is the last version with SQLite support that works in a subfolder (like mydomain.tld/wallabag, although deploying Wallabag in a subfolder isn't officially supported). It will allow you to create an user and start the configuration. Get it here: https://static.wallabag.org/releases/, then tar xvf wallabag-release-2.2.3.tar.gz. If this release doesn't work, use the 2.2.2 one. Normally, you will have a file app/config/parameters.yml like that:

@paolocarrasco
paolocarrasco / README.md
Last active May 30, 2025 11:41
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

@vsee
vsee / Makefile
Created April 8, 2017 07:15
Out of Source Build Makefile Template for C++ Projects
APP=appname
SRC_DIR=src
INC_DIR=inc
OBJ_DIR=obj
BIN_DIR=bin
CC=g++
LD=g++
CFLAGS=-O2 -c -Wall -std=c++11
@Mark-Han
Mark-Han / SumatraPDF-settings.txt
Last active December 19, 2023 01:20
my user setting file for Sumatra, the PDF viewer on Windows
# For documentation, see http://www.sumatrapdfreader.org/settings3.2.html
MainWindowBackground = #000000
EscToExit = true
ReuseInstance = false
UseSysColors = true
RestoreSession = true
FixedPageUI [
TextColor = #000000
@jg-you
jg-you / draw_nx_beautiful.py
Last active February 3, 2025 09:09
Beautiful networkx graph
import copy
import networkx
import matplotlib.pyplot as plt
# Generate a graph.
# Here I chose an ER graph.
g = nx.erdos_renyi_graph(20, 0.3)
# Get positions.
# Here I use the spectral layout and add a little bit of noise.
@ivanistheone
ivanistheone / .cleanup.sh
Last active January 30, 2025 13:54
A shell script I use to (mostly) automatically cleanup my ~/Desktop
#!/bin/bash
MYHOME=$HOME
MYDESKTOP=$HOME/Desktop
echo " _ "
echo " | | "
echo " ___ | | ___ __ _ _ __ _ _ _ __ "
echo " / __|| |/ _ \/ _ | '_ \| | | | '_ \ "
echo " | (__ | | __/ (_| | | | | |_| | |_) |"
echo " \___||_|\___|\__,_|_| |_|\__,_| .__/ "
@simonsmith
simonsmith / hotkeys.md
Created May 16, 2014 11:05
List of Bash hotkeys for Mac

Bash Keyboard Shortcuts - Mac

Enable Option Key as Meta in iTerm. Set as Esc+ - http://stackoverflow.com/a/438892

Moving the cursor

  • Ctrl + a Go to the beginning of the line (Home)
  • Ctrl + e Go to the End of the line (End)
  • Ctrl + p Previous command (Up arrow)
  • Ctrl + n Next command (Down arrow)