Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
You are Manus, an AI agent created by the Manus team. | |
You excel at the following tasks: | |
1. Information gathering, fact-checking, and documentation | |
2. Data processing, analysis, and visualization | |
3. Writing multi-chapter articles and in-depth research reports | |
4. Creating websites, applications, and tools | |
5. Using programming to solve various problems beyond development | |
6. Various tasks that can be accomplished using computers and the internet |
(cors) { | |
@cors_preflight method OPTIONS | |
header { | |
Access-Control-Allow-Origin "{header.origin}" | |
Vary Origin | |
Access-Control-Expose-Headers "Authorization" | |
Access-Control-Allow-Credentials "true" | |
} |
alert('hi'); |
I used to have a site bookmarked with a table of all these functions, but the link is dead. Here's a matrix of Option and Result conversion functions. These become second nature once you have used Rust for any significant length of time, but it's useful to have a table reference.
For each of the below:
T
is the value possibly contained in an input Ok
Result
or Some
Option
.U
is a new value created by transforming or replacing an input T
. Note that when
U
appears in methods like map
, U ?= T
, for example by callingc3M6Ly9ZV1Z6TFRFeU9DMW5ZMjA2WTJNMlpqSXdZekF0TURZMll5MDBPV1k1TFRrNVpXSXRaR1JpTXpZNU1HVmhZbVl5QDEuMS4xLjE6NTMjJUU1JTg5JUE5JUU0JUJEJTk5JUU2JUI1JTgxJUU5JTg3JThGJUVGJUJDJTlBMTAwOC4yNyUyMEdCDQpzczovL1lXVnpMVEV5T0MxblkyMDZZMk0yWmpJd1l6QXRNRFkyWXkwME9XWTVMVGs1WldJdFpHUmlNelk1TUdWaFltWXlAMS4xLjEuMTo1MyMlRTglQjclOUQlRTclQTYlQkIlRTQlQjglOEIlRTYlQUMlQTElRTklODclOEQlRTclQkQlQUUlRTUlODklQTklRTQlQkQlOTklRUYlQkMlOUEyNiUyMCVFNSVBNCVBOQ0Kc3M6Ly9ZV1Z6TFRFeU9DMW5ZMjA2WTJNMlpqSXdZekF0TURZMll5MDBPV1k1TFRrNVpXSXRaR1JpTXpZNU1HVmhZbVl5QDEuMS4xLjE6NTMjJUU1JUE1JTk3JUU5JUE0JTkwJUU1JTg4JUIwJUU2JTlDJTlGJUVGJUJDJTlBMjAyNC0xMS0yNQ0Kc3M6Ly9ZV1Z6TFRFeU9DMW5ZMjA2WTJNMlpqSXdZekF0TURZMll5MDBPV1k1TFRrNVpXSXRaR1JpTXpZNU1HVmhZbVl5QDEuMS4xLjE6NTMjJUU4JUI3JUIzJUU4JUJEJUFDJUU1JTlGJTlGJUU1JTkwJThEJTdCJUU4JUFGJUI3JUU1JThCJUJGJUU4JUJGJTlFJUU2JThFJUE1JTdEJTNBbmZsaW5rLnh5eg0Kc3M6Ly9ZV1Z6TFRFeU9DMW5ZMjA2WTJNMlpqSXdZekF0TURZMll5MDBPV1k1TFRrNVpXSXRaR1JpTXpZNU1HVmhZbVl5QG5lb2V1ci51cHBlcmxheS54eXo6NjMwIyVFNCVCRiU4NCVFNyVCRCU5NyVFNiU5NiVBRiUyMEENCnNzOi8vWVdWekxU |
{ | |
"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: |