$ bzr init-repo my_project
$ cd my_project
$ mkdir my_project/branches
This file contains hidden or 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 Unity, GObject | |
| loop = GObject.MainLoop() | |
| launcher = Unity.LauncherEntry.get_for_desktop_id("gajim.desktop") | |
| launcher.set_property("count", 124) | |
| launcher.set_property("count_visible", True) | |
| loop.run() |
This file contains hidden or 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 dbus | |
| import dbus.service | |
| import dbus.mainloop | |
| from dbus.mainloop.glib import DBusGMainLoop | |
| DBusGMainLoop(set_as_default=True) | |
| import gobject | |
| loop = gobject.MainLoop() |
This file contains hidden or 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
| iptables -I FORWARD -i tun0 -o eth0 \ | |
| -s 10.8.0.0/16 \ | |
| -m conntrack --ctstate NEW \ | |
| -j ACCEPT | |
| iptables -I FORWARD \ | |
| -m conntrack --ctstate RELATED,ESTABLISHED \ | |
| -j ACCEPT | |
| iptables -t nat -I POSTROUTING -o eth0 \ |
This file contains hidden or 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
| logoutput: syslog | |
| internal: tun0 port = 1080 | |
| external: eth0 | |
| clientmethod: none | |
| method: none | |
| user.privileged: proxy | |
| user.notprivileged: nobody | |
| user.libwrap: nobody | |
| client pass { | |
| from: 10.8.0.0/16 to: 0.0.0.0/0 |
This file contains hidden or 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 | |
| for iommu_group in $(find /sys/kernel/iommu_groups/ -maxdepth 1 -mindepth 1 -type d); do | |
| echo -e "\033[1m[IOMMU group $(basename "$iommu_group")]\033[0m"; | |
| for device in $(ls -1 "$iommu_group"/devices/); do | |
| echo -n $'\t'; | |
| lspci -nns "$device"; | |
| done; | |
| done |
This file contains hidden or 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
| [Unit] | |
| Description=NVIDIA VFIO | |
| After=libvirt-bin.service | |
| Before=gdm3.service | |
| [Service] | |
| Type=oneshot | |
| ExecStart=/usr/local/bin/vfio | |
| RemainAfterExit=yes |
This file contains hidden or 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/sh | |
| # save as /usr/local/bin/vfio | |
| virsh nodedev-detach pci_0000_03_00_0 | |
| virsh nodedev-detach pci_0000_03_00_1 |