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
(function (riot, route) { | |
'use strict'; | |
// | |
// Modified version of the riot-router tags | |
// | |
// - Intended to be used recursively. You can even use multiple routers in a tag and they'll work | |
// - Each 'route' event receives the parent container, and any arguments that it would normally get | |
// - Child tags receive an attribute 'route_path' which contains the current routing | |
// - Adding a '/@@' to the end of a route allows the route to have subordinate routers |
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
package anyerr | |
// portions derived from golang context package, BSD license | |
import ( | |
"github.com/hashicorp/go-multierror" | |
"sync" | |
) | |
// closedchan is a reusable closed channel. |
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
$serverScript = <<-SCRIPT | |
sudo apt-get update | |
sudo apt-get -y install nfs-kernel-server | |
sudo mkdir -p /exports/share | |
sudo chown -R vagrant:vagrant /exports | |
echo "/exports 192.168.50.0/24(rw,fsid=0,no_subtree_check,sync,sec=sys)" > /etc/exports |
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
{ | |
"slow-forward": [ | |
[21.084223, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], | |
[21.104242, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], | |
[21.124327, 12.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], | |
[21.144219, 12.0, 0.001, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], | |
[21.164237, 12.0, 0.001, 0.012, 0.012, 0.0, 0.0, 0.0, 0.0], | |
[21.184224, 12.0, 0.001, 0.012, 0.012, 0.0, 0.0, 0.0, 0.0], | |
[21.204217, 12.0, 0.002, 0.012, 0.012, 0.0, 0.0, 0.0, 0.0], | |
[21.224186, 12.0, 0.002, 0.024, 0.024, 0.0, 0.0, 0.0, 0.0], |
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
# | |
# monkeypatch to add 'globmatch' function to PurePath, which implements | |
# the same style of matching that glob supports (which is different | |
# from what match supports) | |
# | |
# Same license as pathlib2 (MIT license) | |
# | |
from __future__ import print_function | |
from pathlib2 import PurePath,PurePosixPath |
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
set clock timezone 0 | |
set vrouter trust-vr sharable | |
set vrouter "untrust-vr" | |
exit | |
set vrouter "trust-vr" | |
unset auto-route-export | |
exit | |
set service "TCP_123" protocol tcp src-port 0-65535 dst-port 123-123 | |
set auth-server "Local" id 0 | |
set auth-server "Local" server-name "Local" |
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
# | |
# This example treeview reproduces the treeview glitching with the gtk-breeze theme | |
# under GTK 3.22 (Fedora 25) | |
# | |
import gi | |
gi.require_version("Gtk", "3.0") | |
from gi.repository import Gtk |
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
# | |
# Proof of concept to hack around lack of thread priority in GStreamer on | |
# Windows. See https://bugzilla.gnome.org/show_bug.cgi?id=781998 | |
# | |
from __future__ import print_function | |
from ctypes.wintypes import BOOL, DWORD, HANDLE, LPCWSTR | |
import ctypes as C |
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 gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk, Gdk | |
win = Gtk.Window.new(Gtk.WindowType.TOPLEVEL) | |
win.connect("delete-event", Gtk.main_quit) | |
win.show_all() | |
win2 = Gtk.Window.new(Gtk.WindowType.TOPLEVEL) |
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 gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk, GdkPixbuf, GLib | |
win = Gtk.Window() | |
win.connect("delete-event", Gtk.main_quit) | |
win.show_all() | |
theme = Gtk.IconTheme.get_default() |
NewerOlder