This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Load Gtk | |
import gi | |
gi.require_version('Gtk', '4.0') | |
from gi.repository import Gtk, Gio, GObject, GLib, Gdk | |
import re | |
from uuid import UUID, uuid4 | |
from typing import Any, Optional |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Load Gtk | |
import gi | |
gi.require_version('Gtk', '4.0') | |
from gi.repository import Gtk, Gio, GObject, GLib, Gdk | |
from uuid import UUID, uuid4 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Generated with glade 3.22.2 --> | |
<interface> | |
<requires lib="gtk+" version="3.20"/> | |
<object class="GtkWindow"> | |
<property name="can_focus">False</property> | |
<child type="titlebar"> | |
<object class="GtkHeaderBar" id="headerbar"> | |
<property name="visible">True</property> | |
<property name="can_focus">False</property> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bus = Gio.bus_get_sync(Gio.BusType.SYSTEM) | |
bus.signal_subscribe(None, 'org.freedesktop.login1.Manager', | |
'PrepareForSleep', None, None, | |
Gio.DBusSignalFlags.NONE, | |
on_prepare_for_sleep) | |
def on_prepare_for_sleep(connection, sender_name, object_path, | |
interface_name, signal_name, parameters, | |
*user_data): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"app-id": "org.gnome.GTG", | |
"runtime": "org.gnome.Sdk", | |
"runtime-version": "3.36", | |
"sdk": "org.gnome.Sdk", | |
"command": "gtg", | |
"finish-args": [ | |
"--share=ipc", | |
"--socket=fallback-x11", | |
"--socket=wayland", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_indices_diamond(i, radius, side): | |
""" Get indices around i in a diamond shape """ | |
indices = [] | |
indices += [i + j for j in range(radius + 1)] | |
indices += [i - j for j in range(1, radius + 1)] | |
for step in range(1, radius): | |
indices += [i + side * step + j for j in range(radius - (step - 1))] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/python | |
""" | |
Remove dates from jekyll post files | |
This is a small script made to remove dates from jekyll files using | |
the 'git mv' command. | |
It expects files to be in the format YYYY-MM-DD-NAME.EXT. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
for scene in bpy.data.scene: | |
scene.render.resolution_x = 1920 | |
scene.render.resolution_y = 1080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This little beauty turns on the numeric | |
# keypad and disables the numlock key. | |
# Requires the numlockx program | |
sleep 0.5 | |
numlockx on && xmodmap -e "keycode 77 = """ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Copyright (C) 2015 Diego Gangl | |
diego@sinestesia.co | |
Created by Diego Gangl. This file is part of Mirage. | |
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. |
NewerOlder