Skip to content

Instantly share code, notes, and snippets.

@monsterxx03
monsterxx03 / celery_test.py
Last active February 11, 2019 04:09
test for celery memory leak
import resource
import gc
from celery import Celery
app = Celery()
app.conf.update(BROKER_URL='redis://localhost:6379/1')
@app.task
def dummy():
package main
import (
"context"
"flag"
"fmt"
"net"
"time"
)
#!/usr/bin/env bash
: '
Simulate `kubectl rollout restart` commnad in 1.15.
'
set -o pipefail
set -o nounset
set -o errexit
usage() {
use std::io::{Read, Write, Result as IoResult};
use std::net::{UdpSocket, TcpStream};
const HOST: &str = "127.0.0.1";
const PORT: u16 = 5354;
const UPSTREAM: &str = "114.114.114.114";
const UPSTREAM_PORT: u16 = 53;
fn be_bytes_to_u16(b: &[u8;2]) -> u16 {
return ((b[0] as u16) << 8) | (b[1] as u16);
package main
import (
"fmt"
"os"
"strconv"
"syscall"
"unsafe"
)
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-config
data:
redis.conf: |-
bind 0.0.0.0
port 6379
protected-mode no
tcp-backlog 511