This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo dmesg | grep ath12k | |
| # [ 6.100088] ath12k_pci 0000:06:00.0: BAR 0 [mem 0x81200000-0x813fffff 64bit]: assigned | |
| # [ 6.100107] ath12k_pci 0000:06:00.0: enabling device (0000 -> 0002) | |
| # [ 6.100266] ath12k_pci 0000:06:00.0: MSI vectors: 16 | |
| # [ 6.100270] ath12k_pci 0000:06:00.0: Hardware name: wcn7850 hw2.0 | |
| # [ 6.264622] mhi mhi0: Direct firmware load for ath12k/WCN7850/hw2.0/amss.bin failed with error -2 | |
| # [ 6.264640] ath12k_pci 0000:06:00.0: failed to set mhi state: POWER_ON(2) | |
| # [ 6.264642] ath12k_pci 0000:06:00.0: failed to start mhi: -110 | |
| # [ 6.264643] ath12k_pci 0000:06:00.0: failed to power up :-110 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # This script is a workaround to virtualbox | |
| # hostonly network hang on OSX Maverick. | |
| vboxmanage hostonlyif remove vboxnet0 | |
| vboxmanage hostonlyif create |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # script to automate the creation of chroot jail | |
| # w/ minimal executables to run git | |
| export CHROOT=/var/chroot | |
| function copy_binary() { | |
| for i in $(ldd $*|grep -v dynamic|cut -d " " -f 3|sed 's/://'|sort|uniq) | |
| do | |
| cp --parents $i $CHROOT |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo hwclock --hctosys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| mkdir ~/.pip | |
| cat <<EOF > ~/.pip/pip.conf | |
| [global] | |
| trusted-host = mirrors.aliyun.com | |
| index-url = http://mirrors.aliyun.com/pypi/simple | |
| EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # pdfunite is part of poppler package | |
| # use `brew install poppler` to install | |
| SOURCE_PDFS=$(ls *.PDF | sort -r | xargs) | |
| pdfunite $SOURCE_PDFS combined.pdf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/ | |
| sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
| sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # nc included in the busybox of Alpine can't be used to do health check as it | |
| # reports exit code 1 when the server closes immediately (because no data was sent). | |
| # If you need nc -z to behave “as expected,” replace BusyBox with OpenBSD netcat: | |
| apk add netcat-openbsd # Alpine | |
| apt install netcat-openbsd # Debian/Ubuntu | |
| # Then nc -z localhost 31311 will succeed if the connect() call works. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import re | |
| import sys | |
| HEADER = r""" | |
| \documentclass{article} | |
| \usepackage{booktabs,makecell,multirow,threeparttable,diagbox} | |
| \usepackage{longtable} | |
| \usepackage{fancyvrb} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import re | |
| import sys | |
| HEADER = r""" | |
| \documentclass{article} | |
| \usepackage{booktabs,makecell,multirow,threeparttable,diagbox} | |
| \usepackage{caption} |
NewerOlder