Skip to content

Instantly share code, notes, and snippets.

View Miqueas's full-sized avatar
👍
Average nerd

Miqueas Miqueas

👍
Average nerd
View GitHub Profile
@diazvictor
diazvictor / ProviderCSS.lua
Last active February 28, 2021 05:53
How To Link Your CSS Styles With LGI (Lua + Gtk)
local lgi = require('lgi')
local Gtk = lgi.require('Gtk', '3.0')
local Gdk = lgi.require('Gdk', '3.0')
assert = lgi.assert -- With this function I will confirm if a file (in this case custom.css) exists.
--- I load my css
local provider = Gtk.CssProvider()
-- Show a message if custom.css does not exist
assert(provider:load_from_path('custom.css'), 'ERROR: file.css not found')
@diazvictor
diazvictor / WindowScreen.lua
Last active February 11, 2021 14:43
WindowScreen - How To Set Window To Current Screen Resolution Using LGI (Lua + Gtk)
local lgi = require('lgi')
local Gtk = lgi.require('Gtk', '3.0')
local Gdk = lgi.require('Gdk', '3.0')
--- I collect the value of the screen resolution
-- and I pick up its width and height
local screen = Gdk.Screen:get_default()
local width, height = screen:get_width(), screen:get_height()
-- Creates the window
@gavr123456789
gavr123456789 / async_GTK_gui_example.vala
Last active July 25, 2024 01:23
async GTK 3 4 gui example vala nim
using Gtk;
Button button;
void main (string[] args) {
Gtk.init (ref args);
var window = new Window ();
button = new Button.with_label ("Start counting");
button.clicked.connect (() => {
@Prakasaka
Prakasaka / bash-colors.md
Created July 25, 2020 09:14 — forked from JBlond/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@fnky
fnky / ANSI.md
Last active June 1, 2025 14:22
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/37.0.2062.94 Chrome/37.0.2062.94 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) Gecko/20100101 Firefox/40.0
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) AppleWebKit/600.8.9 (KHTML, like Gecko) Version/8.0.8 Safari/600.8.9
Mozilla/5.0 (iPad; CPU OS 8_4_1 like Mac OS X) AppleWebKit/600.1.4 (KHTML, like Gecko) Version/8.0 Mobile/12H321 Safari/600.1.4
Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240
Mozilla/5.0 (Windows NT 6.3; WOW64; rv:40.0)