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
#include <blockdev/blockdev.h> | |
#include <blockdev/lvm.h> | |
#include <glib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#define VGNAME "mergetest" | |
#define SNAPNAME "lvol0_snap" | |
void _log (gint level, const gchar *msg) { |
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
# "Guess the Number" game from https://wiki.python.org/moin/SimplePrograms | |
# with some extra PEP 8 violations | |
import random | |
guesses_made = 0 | |
name = input('Hello! What is your name?\n') | |
number = random.randint(1, 20) |
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
# clone the cockpit repo | |
git clone https://github.com/cockpit-project/cockpit | |
# install requirements | |
sudo dnf install nodejs npm | |
sudo dnf install curl expect \ | |
libvirt libvirt-client libvirt-daemon libvirt-python \ | |
python python-libguestfs python-lxml qemu qemu-kvm \ | |
rpm-build rsync xz | |
npm install sizzle phantomjs-prebuilt |
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
from gi.repository import Gtk, Gdk | |
class ExampleWindow(Gtk.Window): | |
def __init__(self): | |
Gtk.Window.__init__(self, title="Example") | |
self.set_default_size(150, 100) | |
self.set_border_width(6) |
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
from gi.repository import Gtk, Gdk | |
class DialogExample(Gtk.Dialog): | |
def __init__(self, parent): | |
Gtk.Dialog.__init__(self, "My Dialog", parent, 0, | |
(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, | |
Gtk.STOCK_OK, Gtk.ResponseType.OK)) | |
self.set_default_size(150, 100) |
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 blivet | |
import pydot | |
b = blivet.Blivet() | |
b.reset() | |
graph = pydot.Dot(graph_type='graph') | |
for device in b.devices: | |
for parent in device.parents: |