Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

import sys, os
from twisted.python import log
from twisted.internet import reactor
from twisted.internet import defer
from twisted.conch.ssh.common import NS
from twisted.conch.scripts.cftp import ClientOptions
from twisted.conch.ssh.filetransfer import FileTransferClient
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.application.service import ServiceMaker
TwistedNames = ServiceMaker(
"Twisted DNS Server",
"resolve",
"A domain name server.",
"resolve")
@tomprince
tomprince / default.nix
Created September 1, 2021 00:04
PEP517 requirements in mach-nix
{mach-nix, pkgs ? import <nixpkgs> {}, lib ? pkgs.lib}:
let
extract-metadata = import ./extract-metadata.nix { inherit lib mkPython pkgs; };
buildPythonApplication = {...}@args: let
metadata = extract-metadata { inherit (args) python src providers; };
requirements = lib.concatStringsSep "\n" metadata.requires_dist;
in
mach-nix.buildPythonApplication ({ inherit requirements; } // args);
in
buildPythonApplication { ... };
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb0f7f3..80c4c37 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,18 +6,6 @@ endif(COMMAND cmake_policy)
# allow empty else and endif constructs (available by default since 2.6.0)
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
-# prevent in-source builds
-IF(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
[ui]
username = Tom Prince <tom.prince@hocat.ca>
interface = curses
pagintate = true
statuscopies = true
rollback = false
ignore = ~/.config/hg/ignore
boardLayouts = {
{ -- 1 Board
["Balanced"] = {
{ pos = Vector(5.96, 1.08, 16.59), rot = Vector(0.00, 180.00, 0.00) },
},
["Thematic"] = {
{ pos = Vector(-1.93, 1.08, 20.44), rot = Vector(0.00, 180.00, 0.00), board = " NE" },
},
},
{ -- 2 Board
from mercurial import (
registrar,
revset,
)
revsetpredicate = registrar.revsetpredicate()
@revsetpredicate('fromfile()')
def revset_fromfile(repo, subset, x):
@tomprince
tomprince / changes.diff
Created November 16, 2017 22:03
Scope changes for Bug 1415619
> taskcluster-admin@1.0.0 tcadmin /home/tomprince/src/taskcluster/taskcluster-admin
> node lib/index.js "make-gecko-branch-role" "-n" "--all"
scope changes required for role repo:hg.mozilla.org/incubator/stylo:*:
- queue:route:index.docker.images.v1.stylo.*
- index:insert-task:docker.images.v1.stylo.*
+ index:route:index:gecko.cache.level-2.*
+ index:insert-task:gecko.cache.level-2.*
+ secrets:get:project/releng/gecko/build/level-2/*
@tomprince
tomprince / ssh_config
Created June 8, 2017 19:00
Config for using a bastion
Host rust-bastion
User tomprince
Hostname 54.215.17.149
Host cargobomb-test
User ec2-user
ProxyJump rust-bastion
Hostname 54.177.234.51
Host cargobomb-prod
diff --git a/src/twisted/internet/_sslverify.py b/src/twisted/internet/_sslverify.py
index b62ccc5..7535297 100644
--- a/src/twisted/internet/_sslverify.py
+++ b/src/twisted/internet/_sslverify.py
@@ -24,32 +24,27 @@ from twisted.python._oldstyle import _oldStyle
from ._idna import _idnaBytes
+import attr