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
@jelcaf
jelcaf / Operaciones-Git
Last active May 15, 2024 15:31
Git Tips - Mini-trucos de Git para facilitarme la tarea
#############################################
# Push de la rama actual
git push origin $rama_actual
#############################################
# Volver a un commit anterior, descartando los cambios
git reset --HARD $SHA1
#############################################
# Ver y descargar Ramas remotas
@paulmoore
paulmoore / Animal.lua
Created December 4, 2011 07:06
A simple Class implementation in Lua for Object-Oriented Programming.
--- Animal.lua
--
-- A simple example of a base class usng the classes library.
--
-- @author PaulMoore
--
-- Copyright (C) 2011 by Strange Ideas Software
--
-- Permission is hereby granted, free of charge, to any person obtaining a copy
-- of this software and associated documentation files (the "Software"), to deal
@exebetche
exebetche / html_parser.lua
Created July 31, 2013 22:00
LUA HTML parser
-- LUA HTML parser
local empty_tags = {
br = true,
hr = true,
img = true,
embed = true,
param = true,
area = true,
@carlos-jenkins
carlos-jenkins / app.py
Created February 10, 2014 20:03
Example to set to a Gtk application a custom theme.
# -*- coding:utf-8 -*-
#
# Copyright (C) 2013 Carlos Jenkins <carlos@jenkins.co.cr>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@SpotlightKid
SpotlightKid / Select-folding-block.lua
Last active July 15, 2018 08:51
Lua script to select folding block in Geany editor
--[[
Select block corresponding to current folding level
--]]
line, col = geany.rowcol()
-- Scintilla uses 0-based line numbering internally
line = line - 1
--~print("L: " .. line .. " C: " .. col)
fstart = geany.scintilla("SCI_GETFOLDPARENT", line)
--~print("S: " .. fstart+1)
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
@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):
@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.
--]]
@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.
@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,