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 main | |
import ( | |
"bufio" | |
"bytes" | |
"flag" | |
"fmt" | |
"io" | |
"log" | |
"os" |
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
#!/usr/bin/python3 | |
import json | |
import argparse | |
import urllib.request | |
import urllib.parse | |
client_id = "1008555780204-finbc9qn6gss7t099l96t1pbqmidv9hm.apps.googleusercontent.com" | |
client_secret = "" |
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
#!/usr/bin/python3 | |
import json | |
import itertools | |
import subprocess | |
out = subprocess.check_output(["crictl", "images", "-o", "json"]) | |
images = json.loads(out.decode("utf-8")) | |
tags = itertools.chain.from_iterable([i["repoTags"] for i in images["images"]]) | |
for repo, repo_tags in itertools.groupby(tags, lambda x: "".join(x.split(":")[:-1])): |
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
// Copyright 2009 The Go Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style | |
// license that can be found in the LICENSE file. | |
package main | |
import ( | |
"crypto" | |
"crypto/rand" | |
"crypto/rsa" |
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
#!/usr/bin/env python3 | |
from contextlib import contextmanager | |
import re | |
import select | |
import socket | |
import sys | |
import urllib.request |
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
diff --git a/keydb.ml b/keydb.ml | |
index 949a1f4..7ff976a 100644 | |
--- a/keydb.ml | |
+++ b/keydb.ml | |
@@ -1166,6 +1166,11 @@ struct | |
try | |
if has_hash hash then [] else | |
let keyid = Fingerprint.keyid_from_key ~short:true key in | |
+ let keyid_long = Fingerprint.keyid_to_string ~short:false (Fingerprint.keyid_from_key ~short:false key) in | |
+ |
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
#!/usr/bin/env python3 | |
# vim: set sw=4 ts=4: | |
import socket | |
import os | |
import threading | |
import time | |
import sys | |
import platform | |
import tempfile | |
import fcntl |
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
go version go1.9 linux/amd64 (from Debian unstable) | |
$ strace ./test 2>&1|grep ioctl | |
ioctl(0, TCGETS, {B9600 opost isig icanon echo ...}) = 0 | |
ioctl(0, TCGETS, {B9600 opost isig icanon echo ...}) = 0 | |
go version go1.8.1 gccgo (Debian 7.2.0-1) 7.2.0 linux/amd64 | |
$ strace ./test 2>&1|grep ioctl |
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 debian.deb822 | |
import debian.copyright | |
import debian.changelog | |
with open('debian/control', 'r') as f: | |
ctrl_p = list(debian.deb822.Deb822.iter_paragraphs(f)) | |
with open('debian/copyright', 'r') as f: | |
copyright = debian.copyright.Copyright(f) |
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
#!/usr/bin/env python3 | |
hz = "VP9z?F<<4sQ'" | |
print(bytes([ord(i)+0x80 for i in hz]).decode('gb2312')) |
NewerOlder