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
# System | |
echo en_US.UTF-8 >> /etc/locale.gen | |
echo LANG=en_US.UTF-8 > /etc/locale.conf | |
export LANG=en_US.UTF-8 | |
echo KEYMAP=us > /etc/vconsole.conf | |
rm /etc/localtime | |
ln -s /usr/share/zoneinfo/US/Pacific /etc/localtime | |
hwclock --systohc --utc | |
echo arch-box /etc/hostname |
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
curl qosmicparticles.io:4444/FetchGobs \ | |
-H "Content-Type: application/json" \ | |
-X POST -d '{"version": "2.0", "key": "rcd1JN+CkZo2+KKR802bXTujubMbiZARQcyTR8Ku8haqdyaz8pA8Z1kbrWJO2J2CiwFdnr", "gobSize": 100}' | |
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" | |
"bytes" | |
"io/ioutil" | |
"net/http" | |
) |
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
// ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ | |
// XHR Example | |
// ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ | |
var data = JSON.stringify({ | |
"version": "2.0", | |
"key": "rcd1JN+CkZo2+KKR802bXTujubMbiZARQcyTR8Ku8haqdyaz8pA8Z1kbrWJO2J2CiwFdnr", | |
"gobSize": 10 | |
}); |
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 test; | |
import java.io.BufferedReader; | |
import java.io.DataOutputStream; | |
import java.io.InputStreamReader; | |
import java.net.HttpURLConnection; | |
import java.net.URL; | |
public class Main { |
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 requests | |
r = requests.post("http://qosmicparticles.io:4444/FetchGobs", data={ | |
"version": "2.0", | |
"key": "rcd1JN+CkZo2+KKR802bXTujubMbiZARQcyTR8Ku8haqdyaz8pA8Z1kbrWJO2J2CiwFdnr", | |
"gobSize": 96 | |
}) | |
print(r.status_code, r.reason) |
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
POST /FetchGobs HTTP/1.1\r\n | |
Host: qosmicparticles.io:4444\r\n | |
Content-Type: application/json\r\n | |
Content-Length: 113\r\n\r\n | |
{"version": "2.0", "key": "rcd1JN+CkZo2+KKR802bXTujubMbiZARQcyTR8Ku8haqdyaz8pA8Z1kbrWJO2J2CiwFdnr", "gobSize": 8} | |
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
// ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ | |
// libcurl Example | |
// ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ ~~~~ | |
CURL *hnd = curl_easy_init(); | |
curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "POST"); | |
curl_easy_setopt(hnd, CURLOPT_URL, "http://qosmicparticles.io:4444/FetchGobs"); | |
struct curl_slist *headers = NULL; |
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
var http = require("http"); | |
var options = { | |
"method": "POST", | |
"hostname": [ | |
"qosmicparticles.io" | |
], | |
"port": "4444", | |
"path": [ |
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
var client = new RestClient("http://qosmicparticles.io:4444/FetchGobs"); | |
var request = new RestRequest(Method.POST); | |
request.AddHeader("Content-Type", "application/json"); | |
request.AddParameter("undefined", "{\n \"version\": \"2.0\",\n \"key\": \"rcd1JN+CkZo2+KKR802bXTujubMbiZARQcyTR8Ku8haqdyaz8pA8Z1kbrWJO2J2CiwFdnr\",\n \"gobSize\": 10\n}", ParameterType.RequestBody); | |
IRestResponse response = client.Execute(request); | |
OlderNewer