Skip to content

Instantly share code, notes, and snippets.

View diazvictor's full-sized avatar
✍️
Haciendo realidad mi imaginación....

Víctor Eduardo Diex Díaz Urbaneja diazvictor

✍️
Haciendo realidad mi imaginación....
View GitHub Profile
@Miqueas
Miqueas / GistsScrapper.go
Last active February 11, 2021 05:27
[Go] Basic scrapper example
package main
import (
// For the exit status
OS "os"
// For printing
Fmt "fmt"
// For commandline arguments
Flag "flag"
// For requests
@Miqueas
Miqueas / GioDirectoryRecursive.lua
Last active July 10, 2021 08:16
[Lua + Gio] Reads directory content recursively
local lgi = require("lgi")
local Gio = lgi.require("Gio", "2.0")
local Content = {}
local Dir = ""
function ReadDir(Path, Tab, Indent)
local file = Gio.File.new_for_path(Path)
local enum = file:enumerate_children("standard::name", Gio.FileQueryInfoFlags.NONE)
local path = file:get_path() .. "/"
@Miqueas
Miqueas / GObjectSubclassing.lua
Last active December 28, 2023 05:27
[Lua + GObject] Subclassing
local lgi = require("lgi")
local GObject = lgi.require("GObject", "2.0")
-- Our new class inherits directly from GObject
local Person = GObject.Object:derive("Person")
-- Class constructor, used by GObject. This function
-- is called one time and is for register our class.
-- Inside this function we can do some things like
-- create some properties, signals and override some
@ernstki
ernstki / README.md
Last active February 28, 2023 19:48
Create dropshadowed thumbnails with a simple command

thumb - a command-line thumbnailer & drop-shadower

Quickly generate drop-shadowed thumbnails from the command line using ImageMagick's [convert][convert], optionally specifying a maximum geometry for either (or both) dimensions.

Sample images created by this script

You can choose whether or not to draw a thin (1-pixel), grey ([#777][grey]) border around the image, or leave it off with the

@Villanuevand
Villanuevand / README-español.md
Last active May 29, 2024 14:32
Una plantilla para hacer un buen README.md. Inspirado en el gist de @PurpleBooth => https://gist.github.com/PurpleBooth/109311bb0361f32d87a2

Título del Proyecto

Acá va un párrafo que describa lo que es el proyecto

Comenzando 🚀

Estas instrucciones te permitirán obtener una copia del proyecto en funcionamiento en tu máquina local para propósitos de desarrollo y pruebas.

Mira Deployment para conocer como desplegar el proyecto.

@73
73 / gtk.css
Created January 2, 2017 10:58
Make Gnome Headerbars Pretty
/* GTK 3.20 .config/gtk-3.0/gtk.css */
headerbar {
min-height: 0px;
padding-left: 5px; /* same as childrens vertical margins for nicer proportions */
padding-right: 4px;
}
/*headerbar entry,
headerbar spinbutton,
headerbar button,
@d2s
d2s / installing-node-with-nvm.md
Last active March 13, 2024 12:09
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.
@marcotrosi
marcotrosi / printTable.lua
Created May 25, 2015 14:39
Lua - printTable - print tables on stdout or write into files
--[[
A simple function to print tables or to write tables into files.
Great for debugging but also for data storage.
When writing into files the 'return' keyword will be added automatically,
so the tables can be loaded with 'dofile()' into a variable.
The basic datatypes table, string, number, boolean and nil are supported.
The tables can be nested and have number and string indices.
This function has no protection when writing files without proper permissions and
when datatypes other then the supported ones are used.
--]]
@juanvmarquezl
juanvmarquezl / calcular_rif.py
Created October 8, 2014 18:59
Calcular y validar digito del RIF en Venezuela
def calcular_rif(data):
'''
Toma un nro de cedula o rif y calcula el digito validador
data: string con nro de CI o RIF sin espacion ni guiones ej.
V12345678
E12345678
J123456789
devuelve el rif con el digito calculado
no se validan los datos de entrada
para validar: if data == calcular_rif(data):
local function string(o)
return '"' .. tostring(o) .. '"'
end
local function recurse(o, indent)
if indent == nil then indent = '' end
local indent2 = indent .. ' '
if type(o) == 'table' then
local s = indent .. '{' .. '\n'
local first = true