Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
set -e
cd ~/.vim_runtime
cat ~/.vim_runtime/vimrcs/basic.vim > ~/.vimrc
echo "Installed the Basic Vim configuration successfully! Enjoy :-)"
@gowinder
gowinder / gist:f0bb9ac2760ac7ace4e3f11988d3b528
Last active November 18, 2020 08:44
install and config zsh
#! /bin/bash
sudo apt update && sudo apt install -y zsh git
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
sed -ri 's#plugins=.*#plugins=(git python zsh-syntax-highlighting zsh-autosuggestions)#g' ~/.zshrc
sed -ri 's#ZSH_THEME=.*#ZSH_THEME="ys"#g' ~/.zshrc
source ~/.zshrc
@gowinder
gowinder / gist:95fe93de273ada6f42a57cbebf716c37
Created January 9, 2020 08:20
enable airprint of hp deskjet 1112 in synology docker 群晖中使用docker开启hp deskjet 1112 的airprint
sudo docker run -d --name=olbat_airprint \
--net=host \
--privileged=true \
-p 631:631 \
-v /volume1/docker/airprint/config:/config \
-v /dev:/dev \
-v /volume1/docker/airprint/avahi:/etc/avahi/services \
-v /var/run/dbus:/var/run/dbus \
olbat/cupsd
@gowinder
gowinder / OpenWRT.Armbian.OPZ
Created September 14, 2017 07:32 — forked from praveenbm5/OpenWRT.Armbian.OPZ
OpenWRT on Orange Pi Zero using Armbian uBoot and Kernel
Guide:
1. Install Armbian_5.24.161216_Orangepizero_Ubuntu_xenial_3.4.113.img onto a uSD card using Win32DiskImager or Ubuntu Disk Image Writer
2. (Optional) Mount the uSD in Ubuntu Laptop and expand the partition using GParted.
3. Delete everything from uSD except /boot, /lib/modules and /lib/firmware.
4. Mount openwrt-15.05.1-sunxi-root.ext4 on Ubuntu using loopback interface on /mnt/openwrt
@gowinder
gowinder / gist:a95025b0f0c211575a272d9a42bb5a65
Created April 13, 2017 02:01
golang string convert to byte slice
s := “abc”
b := []byte(s)
s2 := string(b)