Skip to content

Instantly share code, notes, and snippets.

View luis-l's full-sized avatar
🔧
bit twiddling

Luis Lpz luis-l

🔧
bit twiddling
View GitHub Profile
@luis-l
luis-l / RichTextLabelWithFitToText.gd
Last active May 23, 2020 17:49
Godot: Fit RichTextLabel to text
extends RichTextLabel
var width_adjust = 1.4
var default_font = get("custom_fonts/normal_font")
# Array of string representing multi-line text.
func set_text(lines:Array):
clear()
for ln in lines:
@luis-l
luis-l / lock.sh
Created August 9, 2018 02:20
i3lock-color bash script and configuration
#!/bin/sh -e
# Executes i3lock-color with a configured DPMS setting.
# This is to turn off the displays much quicker when locking the system.
# Also scales the image to fit the resolution
revert()
{
xset dpms $default_sleep_time &&
rm $wallpaper
@luis-l
luis-l / KeyCodeDrawer.cs
Last active July 29, 2017 03:10
Better KeyCode selection for Unity3d
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
// To get access to the selection window: https://github.com/vexe/VFW
using Vexe.Editor.Windows;
@luis-l
luis-l / LICENSE
Last active May 2, 2024 04:25
Qt Interactable QGraphicsView with proper Panning and Zooming.
Copyright (c) 2012-2024 Scott Chacon and others
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 to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@luis-l
luis-l / AVL.h
Last active August 29, 2015 14:24
C++ Templated Basic Data Structures, DirectedGraph, AVL Tree, Priority Queue, Doubly Linked List, Stack, Queue, HashMap, MinHeap
#ifndef AVL_H
#define AVL_H
#include <iostream>
#include <stdlib.h>
#include <stack>
#include "../data_structs/queueLL.h"
using std::stack;
void remove(int x)
{
node *p=top;
node *q=NULL;
while(p!=NULL)
{
if(p->data==x)
q=p;
p=p->next;
@luis-l
luis-l / BST_Driver.java
Last active August 29, 2015 14:03
Simple Binary Search Tree for Summer Camp Students
/**
*
* @author unit978
*/
public class BST_Driver {
public static void main(String[] args) {
BinarySearchTree<Integer> bst = new BinarySearchTree();