Skip to content

Instantly share code, notes, and snippets.

@yangxuan8282
yangxuan8282 / addswap
Last active August 6, 2018 05:25
bash script to add zram for rpi
#!/bin/bash
function addswap {
SIZE=${1:-2G}
fallocate -l $SIZE /swapfile
chmod 600 /swapfile
mkswap /swapfile
swapon /swapfile
}
@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 / Dockerfile
Last active January 4, 2018 06:13
install debian use pxe, 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"]
a52dec aalib acl adwaita-icon-theme alsa-lib alsa-plugins aspell at-spi2-atk at-spi2-core atk attr audit autoconf automake avahi bash binutils bison boost-libs bullet bzip2 ca-certificates ca-certificates-cacert ca-certificates-mozilla ca-certificates-utils cairo cantarell-fonts ccache cdparanoia celt check chromaprint colord compositeproto connman coreutils cracklib crda cryptsetup curl damageproto db dbus dbus-glib dconf desktop-file-utils device-mapper dhcpcd dialog diffutils dnssec-anchors dri2proto dri3proto e2fsprogs elfutils enca expat faac faad2 fakeroot ffmpeg fftw file filesystem findutils fixesproto flac flex fontconfig fontsproto freetype2 fribidi gawk gc gcc gcc-libs gdb gdb-common gdbm gdk-pixbuf2 geoclue2 geocode-glib gettext ghostscript giflib git glib-networking glib2 glibc glibmm glproto glu gmime gmp gnupg gnutls gobject-introspection-runtime gpgme gpm graphene graphite grep groff gsettings-desktop-schemas gsfonts gsm gst-libav gst-plugins-bad gst-plugins-base gst-plugins-base-libs gst-plug
@yangxuan8282
yangxuan8282 / rpi-pkgs.txt
Created December 25, 2017 15:22
e20 pkgs list for archlinux arm
a52dec
aalib
acl
adwaita-icon-theme
alsa-lib
alsa-plugins
aspell
at-spi2-atk
at-spi2-core
atk
@yangxuan8282
yangxuan8282 / install.md
Created December 24, 2017 11:35
install enlightenment on archlinux arm

Install Enlightenment ( Wayland ) on Raspberry Pi (Archlinux arm)

sudo pacman -Syu 
sudo pacman -S packer
ifeq ($(CONFIG_PLATFORM_ARM_RPI), y)
EXTRA_CFLAGS += -DCONFIG_LITTLE_ENDIAN
EXTRA_CFLAGS += -DCONFIG_IOCTL_CFG80211 -DRTW_USE_CFG80211_STA_EVENT
ARCH ?= arm
CROSS_COMPILE ?=
KVER ?= $(shell uname -r)
KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX :=
endif
@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 / tmp.md
Last active June 27, 2017 16:09
tmp use

traefik/docker-compose.yml

version: '2'

services:
  proxy:
    image: traefik
    networks:
      - webgateway
@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