Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
{ | |
"version": "pre-draft", | |
"platform": { | |
"os": "linux", | |
"arch": "amd64" | |
}, | |
"process": { | |
"terminal": false, | |
"user": { | |
"uid": 0, |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
use hyper::{Client, Server, Request, Response, Body}; | |
use anyhow::*; | |
use std::net::SocketAddr; | |
use hyper::service::{make_service_fn, service_fn}; | |
use std::sync::{Arc, RwLock}; | |
fn mutate_request(req: &mut Request<Body>) -> Result<()> { | |
for key in &["content-length", "transfer-encoding", "accept-encoding", "content-encoding"] { | |
req.headers_mut().remove(*key); | |
} |
#!/bin/bash | |
# vim:ft=zsh ts=2 sw=2 sts=2 et | |
# Simple script to convert OGG to MP3 | |
# http://github.com/netzverweigerer | |
# Usage: ogg2mp3 <file1> [<file2> <file3> ...] | |
# Set options for LAME encoder | |
# vbr, ~192k: |
module slice | |
func InterfaceSlice(slice interface{}) []interface{} { | |
switch slice := slice.(type) { | |
case []string: | |
new := make([]interface{}, len(slice)) | |
for i, v := range slice { | |
new[i] = v | |
} | |
return new |
package main | |
import ( | |
"log" | |
"time" | |
) | |
func chan0SendOnly() { | |
c0 := make(chan bool) | |
log.Println("c0, sending") |
docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.5.0
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.5.0
docker pull weaveworks/weave-npc:1.8.2
docker pull weaveworks/weave-kube:1.8.2
#!/usr/bin/env bash | |
## Copyright (C) 2017, Oleksandr Kucherenko | |
## Fork from: https://gist.github.com/OleksandrKucherenko/9fb14f81a29b46886ccd63b774c5959f | |
## Last revisit: 2021-04-01 yangjiming@bytedance.com | |
# For help: | |
# ./versionip.sh --help | |
# For developer / references: | |
# https://ryanstutorials.net/bash-scripting-tutorial/bash-functions.php |