Skip to content

Instantly share code, notes, and snippets.

@shoui520
shoui520 / readmore.md
Last active May 3, 2024 19:56
Chinese Yomichan Setup

Yomichan setup for Chinese

https://learnjapanese.moe

Yomichan is a browser extension created for Japanese which enables its users to quickly and efficiently look up words on a webpage.
While it is made for Japanese, it is possible to use it for other languages, including Chinese.

Getting Yomichan

Yomichan is available for both Chromium and Firefox based browsers. You can find the respective versions below.

@tony612
tony612 / install.sh
Last active December 1, 2018 17:58
Install Elixir/Erlang in 20 seconds in China
# 1.4 on ubuntu 14.04
wget https://mirrors.tuna.tsinghua.edu.cn/erlang-solutions/ubuntu/pool/esl-erlang_19.2-1~ubuntu~trusty_amd64.deb
sudo dpkg -i esl-erlang_19.2-1~ubuntu~trusty_amd64.deb
sudo apt-get -f -y install
sudo dpkg -i esl-erlang_19.2-1~ubuntu~trusty_amd64.deb
wget https://mirrors.tuna.tsinghua.edu.cn/erlang-solutions/ubuntu/pool/elixir_1.4.1-1~ubuntu~trusty_all.deb
sudo dpkg -i elixir_1.4.1-1~ubuntu~trusty_all.deb
elixir -v
# 1.5 on ubuntu 14.04
@barnybug
barnybug / docker-compose.yml
Created November 21, 2017 11:14
Docker compose for a Docker-in-docker gitlab runners setup
# Docker-in-Docker Gitlab runners setup taken from:
# https://medium.com/@tonywooster/docker-in-docker-in-gitlab-runners-220caeb708ca
dind:
restart: always
privileged: true
volumes:
- /var/lib/docker
image: docker:17.09.0-ce-dind
command:
- --storage-driver=overlay2
@itsuwari
itsuwari / Install environment.sh
Last active July 25, 2022 17:01
Install openresty with Fancyindex
#!/bin/bash
#Install base pakages
sudo apt-get -y update && apt upgrade -y
sudo apt-get -y install ntpdate man man-db mtr ipset iperf3 dnsmasq python3-pip curl aria2 python3-lxml \
fuse build-essential git zip libpcre3-dev libevent-dev libssl-dev libcurl4-openssl-dev libgd-dev libgeoip-dev libpq-dev libxslt1-dev \
software-properties-common autotools-dev cdbs debhelper dh-autoreconf dpkg-dev gettext libev-dev libpcre3-dev libudns-dev pkg-config fakeroot devscripts \
autoconf libtool pkg-config python3-dev libssl-dev
sudo apt-get autoremove -y
# Update time
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@so0k
so0k / kubectl.md
Last active April 25, 2024 12:40
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@MrTrustor
MrTrustor / clean-docker-for-mac.sh
Last active November 21, 2023 11:38
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@aappddeevv
aappddeevv / examples-akka-server.md
Last active October 11, 2017 08:19
akka, http, server

A relatively simple akka server with a few bells and whistes.

package example

import scala.language._
import akka.actor._
import akka.http.scaladsl
import scaladsl._
@jgornick
jgornick / docker-cleanup.sh
Created May 20, 2016 19:07
Docker: Cleanup (Remove all exited containers and dangling images)
#!/bin/bash
docker rm $(docker ps -q -f status=exited)
docker rmi $(docker images -q -f dangling=true)
@tanyuan
tanyuan / smart-caps-lock.md
Last active May 3, 2024 08:19
Smart Caps Lock: Remap Caps Lock to Control AND Escape

Smart Caps Lock: Remap to Control AND Escape (Linux, Mac, Windows)

Caps Lock 變成智慧的 Control 以及 Escape

  • 單獨輕按一下就是 Escape
  • 若按下時同時按著其他鍵,就會是 Control

這應該是 Vim 和 Emacs 的最佳解了!(Emacs? Bash 的快捷鍵就是 Emacs 系列的)

  • Send Escape if you tap Caps Lock alone.