Skip to content

Instantly share code, notes, and snippets.

@yangxuan8282
yangxuan8282 / muttrc
Created December 9, 2016 08:56
Hotmail template config for mutt, just insert your mail account and password to "imap_user" and "imap_pass", if 2-factor is enable, generate an app password.
set ssl_starttls=yes
set ssl_force_tls=yes
set imap_user = 'user_name@hotmail.com'
set imap_pass = 'password_here'
set from= $imap_user
set use_from=yes
set realname='Your_Name'
set folder = imaps://imap-mail.outlook.com:993
set spoolfile = "+INBOX"
@yangxuan8282
yangxuan8282 / emoji-info.sh
Last active October 14, 2023 07:26
Emoji❤bash
#!/bin/bash
# run this scripts with `bash emoji-info.sh` or `./emoji-info.sh`
usage() {
cat << EOF
usage: $0 [options] <emoji>
Options:
-h Show this message
-o Octal Escape Sequence
@yangxuan8282
yangxuan8282 / Dockerfile.dnsmasq
Last active September 27, 2022 10:52
pi netboot with docker
FROM arm32v6/alpine
RUN apk add --no-cache dnsmasq
EXPOSE 53/tcp \
53/udp \
67/udp
ENTRYPOINT ["dnsmasq", "--no-daemon", "--user=dnsmasq", "--group=dnsmasq"]
@yangxuan8282
yangxuan8282 / README.md
Created April 4, 2018 07:03
install Basilisk II on rpi

install Basilisk II without X11 on raspberry pi (raspbian stretch lite)

sudo apt update && sudo apt upgrade -y
sudo apt install automake gobjc -y
@yangxuan8282
yangxuan8282 / Dockerfile
Created April 2, 2018 15:46
compile https://github.com/hex007/freej2me, run with: docker run --rm -v $(pwd)/freej2me:/tmp/freej2me-master freej2me:build
FROM arm32v7/debian
RUN set -xe \
&& apt-get update \
&& apt-get install -y ant openjdk-8-jdk openjfx wget unzip \
#&& export JAVA_HOME='/usr/lib/jvm/java-8-openjdk-armhf/' \
&& wget https://github.com/hex007/freej2me/archive/master.zip \
&& unzip master.zip
ENV JAVA_HOME="/usr/lib/jvm/java-8-openjdk-armhf/"
@yangxuan8282
yangxuan8282 / README.md
Last active July 3, 2022 00:54
the systemd of ssh tunnel for https

PortForwarding with ssh tunnel

you need install autossh first

you can edit bash scripts then run it, or paste systemd templates to your /etc/systemd/system path, and check bash scripts to finish rest step

@yangxuan8282
yangxuan8282 / .bashrc
Last active May 19, 2022 03:48 — forked from rickdaalhuizen90/.bashrc
Parrot Os bash theme for alpine
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@yangxuan8282
yangxuan8282 / gen-alpine.sh
Last active April 12, 2022 09:57
shell script to help install alpine to raspberry pi, pc
#!/bin/sh
#genetate alpine edge x86/x86_64 image: chmod +x gen-alpine.sh && sudo ./gen-alpine.sh
#depends: apk-tools-static, vim(xxd)
set -x
die() {
printf '\033[1;31mERROR:\033[0m %s\n' "$@" >&2 # bold red
exit 1
}
@yangxuan8282
yangxuan8282 / compile-mpv-mmal-rpi.md
Last active June 3, 2020 14:23
compile mpv with hardware acceleration (mmal) on RPi, no windows borders

mpv

The latest working mpv version for this guides is 0.27.2, tested on 2018-03-13-raspbian-stretch.

sudo apt-get update && sudo apt-get upgrade -y && 
sudo apt-get install -y git devscripts equivs &&
sudo apt-get install -y libgles2-mesa-dev
@yangxuan8282
yangxuan8282 / dependencies.txt
Last active April 8, 2019 09:03
archlinux arm xfce4 packages list
# aur
packer
# compile
git
base-devel
# xorg
xorg-server
xf86-video-fbdev