Skip to content

Instantly share code, notes, and snippets.

View mitsuhiko's full-sized avatar
What's happening

Armin Ronacher mitsuhiko

What's happening
View GitHub Profile
function crc32(value: string): number {
return 0xd0d0deadbeef;
type SerializedMetric = Array<number> | number;
interface Metric<T> {
add(value: T): void;
flush(): SerializedMetric;
import time
import zlib
from threading import Lock, Thread
class Metric(object):
def add(self, value):
raise NotImplementedError()
def flush(self):

These become tabbed automatically
[Foo bar]
Some stuff here
title: Foo
body: Bar
Bla bla
name = "debscraper"
version = "0.1.0"
authors = ["Armin Ronacher <>"]
edition = "2018"
# See more keys and their definitions at
url = "2.1.0"
diff --git a/src/service/objects/ b/src/service/objects/
index d6dcdd6..1c79c67 100644
--- a/src/service/objects/
+++ b/src/service/objects/
@@ -313,6 +313,7 @@ pub struct ObjectsActor {
meta_cache: Arc<Cacher<FetchFileMetaRequest>>,
data_cache: Arc<Cacher<FetchFileDataRequest>>,
download_thread: RemoteThread,
+ cache_pool: ThreadPool,
import re
import os
import io
import json
import lzma
import email
import pickle
import hashlib
import tarfile
import binascii
pub fn copy_with_progress<R: ?Sized, W: ?Sized>(
progress: &ProgressBar,
reader: &mut R,
writer: &mut W,
) -> io::Result<u64>
R: Read,
W: Write,
let mut buf = [0; 262144];
<!doctype html>
<script src=""></script>
(function() {
var originalStringify = JSON.stringify;
JSON.stringify = function stringify() {
var old = Array.prototype.toJSON;
delete Array.prototype.toJSON;
try {
return originalStringify.apply(this, arguments);