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 resource | |
import gc | |
from celery import Celery | |
app = Celery() | |
app.conf.update(BROKER_URL='redis://localhost:6379/1') | |
@app.task | |
def dummy(): |
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 ( | |
"context" | |
"flag" | |
"fmt" | |
"net" | |
"time" | |
) |
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 bash | |
: ' | |
Simulate `kubectl rollout restart` commnad in 1.15. | |
' | |
set -o pipefail | |
set -o nounset | |
set -o errexit | |
usage() { |
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
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); |
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 ( | |
"fmt" | |
"os" | |
"strconv" | |
"syscall" | |
"unsafe" | |
) |
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
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: redis-config | |
data: | |
redis.conf: |- | |
bind 0.0.0.0 | |
port 6379 | |
protected-mode no | |
tcp-backlog 511 |
OlderNewer