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
@diazvictor
diazvictor / truncate.lua
Created October 16, 2023 17:59
A truncate string function
--[[--
@package Solus Frontend
@filename truncate.lua
@version 1.0
@author Díaz Urbaneja Víctor Eduardo Diex <victor.vector008@gmail.com>
@date 04.01.2021 19:53:44 -04
@see https://github.com/diazvictor/solus-organizer/blob/solus-new/test/truncate.lua
]]
local str = "Donkey Kong Country 3 - Dixie Kong's Double Trouble.sfc"
@diazvictor
diazvictor / custom.css
Created September 5, 2021 04:06
Button With Gradient Border In GTK3
/* Button defect styles reset */
button {
box-shadow: none;
text-shadow: none;
border: none;
outline: none;
}
/* The box will simulate the border */
box {
@diazvictor
diazvictor / cakes.sql
Created March 24, 2021 22:19
SoloLearn | SQL | Cakes
/**!
* @package SoloLearn | Sql
* @filename cakes.sql
* @autor Díaz Urbaneja Víctor Eduardo Diex <victor.vector008@gmail.com>
* @date 24.03.2021 17:54:43 -04
*/
-- This is an exercise from the solorearn course:
-- https://www.sololearn.com/learning/1060/
@diazvictor
diazvictor / filetypes.Less.conf
Created March 22, 2021 05:26
LESS Filetype For Geany
# For complete documentation of this file, please see Geany's main documentation
[styling=CSS]
[keywords=CSS]
[lexer_properties=CSS]
lexer.css.less.language=1
[settings]
lexer_filetype=CSS
@diazvictor
diazvictor / InventoryGame.php
Last active March 7, 2021 06:41
Small Example Of A Game Inventory With PHP
<?php
// This example is a port of: https://gist.github.com/diazvictor/6fe3372bce79587a3c21123a19881cb1
// I create the Inventory class
class Inventory {
// What to do when the class is initialized
public function __construct() {
$this->items = array();
}
/**
@diazvictor
diazvictor / InventoryGame.moon
Last active February 28, 2021 05:45
Small Example Of A Game Inventory With MoonScript
-- I create the Inventory class
class Inventory
-- What to do when the class is initialized
new: =>
@items = {}
--- I look at what I carry in my inventory.
-- @return bool true or false if there are items.
getItem: =>
if #@items != 0 then
@diazvictor
diazvictor / GtkClock.lua
Created February 24, 2021 08:36
A simple clock with LGI (Lua + GTK)
--[[--
@desc A simple clock with LGI (Lua + GTK)
@author Díaz Urbaneja Víctor Eduardo Diex <victor.vector008@gmail.com>
@date 23.02.2021 03:57:22 -04
]]
-- I require the LGI libraries
local lgi = require('lgi')
local Gtk = lgi.require('Gtk', '3.0')
local GLib = lgi.require('GLib', '2.0')
@diazvictor
diazvictor / PathsLGI.md
Last active November 25, 2023 06:39
Paths of standard files of a GTK project for LGI.

Paths of standard files of a GTK project for LGI.

This information has been collected by observing the GNOME projects. Especially those of PGI

com.github.project is the name of your project.

com.github.project/
├── data/
│ ├── appdata/
@diazvictor
diazvictor / WidgetMessages.lua
Last active February 20, 2021 08:53
Widget To Display Messages ("For" And "From") With LGI (Lua + GTK)
--[[
These widgets are used in the MoonZaphire project <https://github.com/diazvictor/MoonZaphire/>
@date 20.02.2021 04:12:56 -04
]]
-- I require the LGI libraries
local lgi = require('lgi')
local Gtk = lgi.require('Gtk', '3.0')
local GLib = lgi.require('GLib', '2.0')
@diazvictor
diazvictor / InventoryGame.js
Last active November 14, 2023 23:24
Small Example Of A Game Inventory With Javascript
/* jshint esversion: 8 */
// This example is a port of: https://gist.github.com/diazvictor/6fe3372bce79587a3c21123a19881cb1
// I create the Inventory class
class Inventory {
// What to do when the class is initialized
constructor() {
this.items = [];
}