Skip to content

Instantly share code, notes, and snippets.

View tallero's full-sized avatar

Pellegrino Prevete tallero

View GitHub Profile
@diosmosis
diosmosis / async.py
Created August 8, 2011 18:46
Asynchronous function calling with python and GTK.
import threading
from gi.repository import GObject
# calls f on another thread
def async_call(f, on_done):
"""
Starts a new thread that calls f and schedules on_done to be run (on the main
thread) when GTK is not busy.
Args:
@sergejx
sergejx / gist:2358089
Created April 11, 2012 08:59
Set dark theme for GTK+ application
from gi.repository import Gtk
settings = Gtk.Settings.get_default()
settings.set_property("gtk-application-prefer-dark-theme", True)
@Pysis868
Pysis868 / grub.cfg
Last active August 4, 2024 02:31
My own configuration file for GRUB2 to boot various live distributions of Linux-based operating systems, along with some system tools. I tried to include a lot of sample configuration entries, even if I don't currently use them, so it may help others. Exceedingly long blog post: http://tehfishyblog.logdown.com/chips/306146-a-homemade-ultimate-bo…
# Config for GNU GRand Unified Bootloader (GRUB) (2)
# /boot/grub2/grub.cfg
# or
# /boot/grub/grub.cfg
# Mostly only 'legacy' CSM/BIOS boot methods currently.
# Unable to boot loop entries with Secure Boot
# Notes:
# Description:
# This grub.cfg file was created by Lance http://www.pendrivelinux.com
@saurabhshri
saurabhshri / pip.md
Last active June 7, 2024 12:58
Install and use pip in a local directory without root/sudo access.

Install and use pip in a local directory without root/sudo access.

Why?

Many users when are given server access, do not have root (or sudo) privileges and can not simply do sudo apt-get install python-pip . Here's an easy way you can install and use pip without root (or sudo) access in a local directory. Note : This works without easy_install too.

How?

wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-uboot-3.7.0-armhf.tar.gz
wget http://dl-cdn.alpinelinux.org/alpine/v3.7/releases/armhf/alpine-minirootfs-3.7.0-armhf.tar.gz
qemu-img create -f raw sd.img 512M
sudo losetup /dev/loop0 sd.img
sudo kpartx -av /dev/loop0
lsblk
sudo mkfs.ext4 /dev/mapper/loop0p1
mount -t ext4 /dev/mapper/loop0p1 /mnt
@MawKKe
MawKKe / cryptsetup-with-luks2-and-integrity-demo.sh
Last active November 13, 2024 18:33
dm-crypt + dm-integrity + dm-raid = awesome!
#!/usr/bin/env bash
#
# Author: Markus (MawKKe) [email protected]
# Date: 2018-03-19
#
#
# What?
#
# Linux dm-crypt + dm-integrity + dm-raid (RAID1)
#
@paolocarrasco
paolocarrasco / README.md
Last active November 5, 2024 20:08
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
flatpak:
image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master'
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.NautilusDevel.yml"
FLATPAK_MODULE: "nautilus"
APP_ID: "org.gnome.NautilusDevel"
RUNTIME_REPO: "https://nightly.gnome.org/gnome-nightly.flatpakrepo"
BUNDLE: "nautilus-dev.flatpak"