Skip to content

Instantly share code, notes, and snippets.

View CroMarmot's full-sized avatar
🐀

陈鼫RWHTYFZ CroMarmot

🐀
View GitHub Profile

https://www.thegeekstuff.com/2012/04/route-examples/

同时两个网卡,一个外网,一个内网

查看 route -n

删除内网的 route del default gw <内网网关 ip>

增加要使用内网的ip段,假设是 172.16.*.*route add -net 172.16.0.0/16 gw &lt;内网网关 ip&gt;

@CroMarmot
CroMarmot / git_rewrite_specific_commit_author.sh
Last active May 25, 2020 08:22
git_rewrite_specific_commit_author_not_commiter
#!/usr/bin/env sh
######################################################################
# @author : cromarmot (yexiaorain@gmail.com)
# @file : r
# @created : 星期五 4月 03, 2020 10:37:59 CST
#
# @description :
# Usage : ./script.sh <full hash> <new author name> <new author email>
######################################################################

~/.local/share/Euro Truck Simulator 2/music/

Apparently, ETS2 only reads .ogg and AAC radio streams. No big deal, since ogg is a more modern, better format that mp3. If you have a flac collection converting to ogg is MUCH better than converting to mp3. And with modern CPUs even converting large music collecions is just a matter of minutes.

use ffmpeg!!!

unzip -O <encoding> <filename> -d <target_dir>
/**
* @class : vue-router
* @author : cromarmot (yexiaorain@gmail.com)
* @created : 星期一 9月 02, 2019 15:01:49 CST
* @description : vue-router
*/
class HistoryRoute {
constructor(){
this.current = null;
  1. install mosh both on local computer and server:apt install mosh
  2. add LANGUAGE=en_US to /etc/default/locale
  3. dpkg-reconfigure locales
  4. add export LC_ALL="en_US.UTF-8" in server's ~/.bashrc
  5. ufw allow 60001
  6. mosh anything like ssh

unused

scripts: https://gist.github.com/valorin/10c953c73f0da5fbee2f

Host gitolite-as-alice
  HostName git.company.com
  User git
  IdentityFile /home/whoever/.ssh/id_rsa.alice
  IdentitiesOnly yes

Host gitolite-as-bob
  HostName git.company.com
 User git

https://www.v2ex.com/t/208167

检查

lastb | awk '{ print $3}' | sort | uniq -c | sort -n

禁止

iptables -I INPUT -s xxx.xxx.xxx.xxx/24 -j DROP