Skip to content

Instantly share code, notes, and snippets.

View pandada8's full-sized avatar
🐟
摸鱼

pandada8 pandada8

🐟
摸鱼
View GitHub Profile
@pandada8
pandada8 / sdd
Created November 16, 2017 04:17
disk
smartctl 6.6 2017-11-05 r4594 [x86_64-linux-4.13.11-1-ARCH] (local build)
Copyright (C) 2002-17, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Hitachi/HGST Ultrastar 7K4000
Device Model: Hitachi HUS724030ALE641
Serial Number: P8GM20NR
LU WWN Device Id: 5 000cca 22cc8aaa3
Firmware Version: MJ8OA5F0
User Capacity: 3,000,592,982,016 bytes [3.00 TB]
@pandada8
pandada8 / readme.md
Created November 12, 2017 16:05
gnome Is awesome
  1. prevent anjuta open the folder
xdg-mime default org.gnome.Nautilus.desktop inode/directory
@pandada8
pandada8 / authy.py
Last active February 17, 2022 14:28
Migrate from authy to pass-otp
import xml.etree.ElementTree as ET
import json
import sys
import re
def load(name):
root = ET.parse(name)
return json.loads(root.findtext('./string'))
def normalize(record):
Module Size Used by
ipt_MASQUERADE 16384 1
nf_nat_masquerade_ipv4 16384 1 ipt_MASQUERADE
nf_conntrack_netlink 32768 0
nfnetlink 16384 2 nf_conntrack_netlink
iptable_nat 16384 1
nf_conntrack_ipv4 16384 3
nf_defrag_ipv4 16384 1 nf_conntrack_ipv4
nf_nat_ipv4 16384 1 iptable_nat
xt_addrtype 16384 2
@pandada8
pandada8 / disable
Created August 24, 2017 07:38
disable
config.plugins.some(x => {
if (x.shouldClearConsole !== undefined) {
config.plugins.splice(config.plugins.indexOf(x), 1)
return true
}
})
@pandada8
pandada8 / app.ini
Last active July 26, 2017 05:49
gogs setup guide
APP_NAME = panda
RUN_USER = git
RUN_MODE = prod
[attachment]
ENABLED = true
PATH = /home/pan/app/git-attachment
[session]
PROVIDER = file
@pandada8
pandada8 / clean_meteor_old_packages.py
Created July 22, 2017 11:28
Clean Meteor Old Packages With Python 3
import os
from distutils.version import LooseVersion
import shutil
path = os.path.expanduser('~/.meteor/packages')
for root, dirs, files in os.walk(path):
if root == path:
continue
version = sorted([i for i in dirs if i[0] != '.'], key=LooseVersion)
if len(version) > 1:
sudo apt install automake libssl-dev
@pandada8
pandada8 / pass.py
Created June 13, 2017 01:03
dump pass
import subprocess
import glob
import json
import os
p = {}
os.chdir(os.path.expanduser("~/.password-store"))
for f in glob.glob("**/*.gpg", recursive=True):
name = os.path.splitext(f)[0]
print(name)
e = subprocess.check_output(["pass", name])
@pandada8
pandada8 / 1.sh
Last active March 2, 2017 11:38
debian init
sed -i "s/jessie/stretch/g" /etc/apt/sources.list && apt update -y && apt dist-upgrade -y && printf "net.ipv4.tcp_congestion_control=bbr\nnet.core.default_qdisc=fq" >> /etc/sysctl.conf