A convenient way to expose a websocket connections in route handles.
const express = require('express')
, ws = require('./ws')
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
// make a request | |
const options = { | |
port: 1337, | |
host: 'localhost', | |
headers: { | |
'Connection': 'Upgrade', | |
'Upgrade': 'websocket' | |
} | |
}; | |
const protocol = 'http' |
These results are invalid. Some of the server implementations don't parse correctly and rust-tokio/ponylang-tcp don't seem to parse at all. See here for better benchmarks: https://gist.github.com/kprotty/5a41e9612657de00788478a7dde43d78
====
wrk -t4 -c128 -d10 --latency http://localhost:12345
// you need this in your cargo.toml | |
// reqwest = { version = "0.11.3", features = ["stream"] } | |
// futures-util = "0.3.14" | |
// indicatif = "0.15.0" | |
use std::cmp::min; | |
use std::fs::File; | |
use std::io::Write; | |
use reqwest::Client; | |
use indicatif::{ProgressBar, ProgressStyle}; |
func buildEmailInput(source, destination, subject, message string, | |
csvFile []byte) (*ses.SendRawEmailInput, error) { | |
buf := new(bytes.Buffer) | |
writer := multipart.NewWriter(buf) | |
// email main header: | |
h := make(textproto.MIMEHeader) | |
h.Set("From", source) |
# You must first install apktool (https://github.com/iBotPeaches/Apktool) and android SDK | |
# and decompile apk using it | |
# apktool d -rf my-app.apk | |
# then generate a key for sign in: | |
# keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000 | |
rm signed-app.apk | |
apktool b -f -d com.myapp | |
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore com.myapp/dist/com.myapp.apk alias_name | |
zipalign -v 4 com.myapp/dist/com.myapp.apk signed-app.apk |
--- | |
version: '3.5' | |
networks: | |
default: | |
name: kafka-net | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:4.1.1 | |
hostname: zookeeper |
#!/bin/zsh | |
alias dos="toilet -f mono12 -F metal -t" | |
alias dosg="toilet -f mono12 -F gay -t" | |
clear | |
echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo "";echo ""; | |
dos "Apa yang kau";dosg "harap di bumi...." | |
sleep 2.5 | |
clear |