- self-hosted search engine
- meta search, checking several APIs, e.g. bing, google (are there others?)
- search through an index of my own web browsing history (I may be looking for sth I read last week)
- search using search API offered by sites, eg Wikipedia, github, archive.org, media.ccc.de, peertube, youtube even (do they even offer APIs? They totally should!)
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
# list installed distributions | |
wsl --list -v | |
# replace Ubuntu to use another distribution | |
wsl -d Ubuntu -u root |
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
METHOD=${1:-${METHOD:-"A"}} | |
if [ "$METHOD" == "A" ] | |
then | |
export CARGO_INCREMENTAL=0 | |
export RUSTFLAGS="-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort" | |
export RUSTDOCFLAGS="-Cpanic=abort" | |
unset LLVM_PROFILE_FILE | |
else |
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
## run with `docker run --security-opt seccomp=unconfined -it <image-name>` | |
## (-it in case your unit tests rely on the ability to read stdin) | |
FROM rust:1-slim-buster as builder | |
RUN apt update && apt install -y pkg-config libssl-dev && cargo install cargo-tarpaulin | |
WORKDIR /build | |
COPY . . |
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] | |
name = "weird_async_write_behaviour" | |
version = "1.0.0" | |
authors = ["@hn3000", "@rkarp"] | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
async-std = "1.9.0" |
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
#!/bin/bash | |
# this file wants to be called /etc/libvirt/hooks/qemu | |
# see https://wiki.libvirt.org/page/Networking | |
#!/bin/bash | |
echo "$0: ($(dirname $0) $(pwd)) $*" >> /var/log/qemu-nohop.out | |
export XML="$(cat)" | |
nohup $(dirname $0)/update-forwards.sh "$@" >> /var/log/qemu-nohop.out & |
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
npm test && npm version patch && npm publish && git push --tags |
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
function createDataUrl(icon: string): Promise<string> { | |
const result = new Promise<string>((resolve, _reject) => { | |
let image = new Image(); | |
image.addEventListener('load', () => { | |
let canvas = document.createElement('canvas'); | |
canvas.width = image.naturalWidth; | |
canvas.height = image.naturalHeight; | |
canvas.getContext('2d').drawImage(image, 0, 0); | |
resolve (canvas.toDataURL('image/png')); | |
}); |
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
{ | |
"$schema": "http://json.schemastore.org/swagger-2.0", | |
"swagger": "2.0", | |
"info": { | |
"title": "Swaggerized Algolia API", | |
"version": "1" | |
}, | |
"basePath": "/1", | |
"schemes": [ "https" ], | |
"host": "${APPLICATION_ID}-dsn.algolia.net", |
NewerOlder