Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
use std::sync::{Arc, Mutex}; | |
use std::thread; | |
fn main() { | |
let a = Arc::new(Mutex::new(0)); | |
let b = Arc::new(Mutex::new(0)); | |
let mut handles = vec![]; | |
{ | |
let a = Arc::clone(&a); |
///bin/true;COMPILER_OPTIONS="-g -Wall -Wextra --std=c99 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $COMPILER_OPTIONS -xc "$THIS_FILE" -o "$OUT_FILE" || exit;exec "$OUT_FILE" "$@" | |
#include <stdio.h> | |
int main() { | |
printf("Hello world!\n"); | |
return 0; | |
} |
[ Update 2020-05-31: I won't be maintaining this page or responding to comments anymore (except for perhaps a few exceptional occasions). ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
#!/bin/bash | |
pretty() { | |
prefix=$1 | |
# a named pipe can be unlinked as soon as it has been attached to some file descriptor | |
# this allows to create anonymous pipes | |
# create a temporary named pipe | |
PIPE=$(mktemp -u) |
With this wiki2html.sh bash script and pandoc program, you can convert markdown to html.
Usage: In the vim list section of the .vimrcfile, include options:
let g:vimwiki_list = [{'path': ‘your_wiki_place',
\ 'path_html': ‘wiki_html_location’,
\ 'syntax': 'markdown',
\ 'ext': '.md',
# LICENSE: MIT, wtfpl or whatever OSS license you like | |
function get_stack () { | |
STACK="" | |
local i message="${1:-""}" | |
local stack_size=${#FUNCNAME[@]} | |
# to avoid noise we start with 1 to skip the get_stack function | |
for (( i=1; i<$stack_size; i++ )); do | |
local func="${FUNCNAME[$i]}" | |
[ x$func = x ] && func=MAIN | |
local linen="${BASH_LINENO[$(( i - 1 ))]}" |
#!/bin/bash | |
TMUX_VERSION=2.3 | |
NCURSES_VERSION=6.0 | |
LIBEVENT_VERSION=2.0.22 | |
BASEDIR=${HOME}/work/tmux-static | |
TMUXTARGET=${BASEDIR}/local | |
mkdir -p $TMUXTARGET | |
cd $BASEDIR |
This page is about embedding raster images into svg or html as data URI string. Data URI being base64 string, we first need to convert our image into base64 strings. There I explain how to do it server side and client side.
Given image.png
as a valid image, let's creates a *.b64 copy as a text file containing a valid base64 text string.
openssl base64 -in image.png -out image.b64
echo $(cat image.b64)