This is a very simple HTTP server for Unix, using fork(). It's very easy to use
- include header
httpd.h - write your route method, handling requests.
- call
serve_forever("12913")to start serving on port 12913
| package main | |
| import ( | |
| "log" | |
| "net" | |
| ) | |
| func main() { | |
| // listen to incoming udp packets | |
| pc, err := net.ListenPacket("udp", ":1053") |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: coredns | |
| spec: | |
| ports: | |
| - name: coredns | |
| port: 53 | |
| protocol: UDP | |
| targetPort: 53 |
| /* | |
| * udpserver.c - A simple UDP echo server | |
| * usage: udpserver <port> | |
| */ | |
| #include <stdio.h> | |
| #include <unistd.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <netdb.h> |
| default: | |
| cc ccsmtp.c -o ccsmtpd -lpthread |
| var ws = new WebSocket("ws://localhost:8000/") | |
| var msg = JSON.stringify({"test": "data"}) | |
| ws.send(msg) |
| import javax.crypto.Cipher; | |
| class Test { | |
| public static void main(String[] args) { | |
| try { | |
| System.out.println("Hello World!"); | |
| int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); | |
| System.out.println(maxKeyLen); | |
| } catch (Exception e){ | |
| System.out.println("Sad world :("); |
ffmpeg -i "Apache Sqoop Tutorial Part 1.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate1.ts
ffmpeg -i "Apache Sqoop Tutorial Part 2.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate2.ts
ffmpeg -i "Apache Sqoop Tutorial Part 3.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate3.ts
ffmpeg -i "Apache Sqoop Tutorial Part 4.mp4" -c copy -bsf:v h264_mp4toannexb -f mpegts intermediate4.ts
ffmpeg -i "concat:intermediate1.ts|intermediate2.ts|intermediate3.ts|intermediate4.ts" -c copy -bsf:a aac_adtstoasc "Apache Sqoop Tutorial.mp4"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| # Copyright 2014 Dan Krause | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, |