Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am iamwrm on github.
  • I am iamwr (https://keybase.io/iamwr) on keybase.
  • I have a public key ASBSsui1dM5C32p69S7Pc4u-A7JNweX2YvO7U3TeDNWk0go

To claim this, I am signing this object:

@iamwrm
iamwrm / docker.sh
Created Dec 31, 2018
docker related
View docker.sh
sudo groupadd docker
sudo gpasswd -a $USER docker
@iamwrm
iamwrm / m1.md
Created Dec 19, 2018
macOS kernel extension disable
View m1.md

sudo kextunload -b com.apple.filesystems.smbfs

View update.sh
rsync -azvh --delete-after . parallels@192.168.0.108:~/Documents/l8
rsync -azvh -e 'ssh -p 3023' Downloads/docker-ce_18.09.0_3-0_ubuntu-bionic_amd64.deb wr@localhost:/home/wr
@iamwrm
iamwrm / main.tex
Last active Dec 7, 2018
Latex userful sripts
View main.tex
Insert pictures
\begin{figure}[H]
\centering
\includegraphics[width=1\textwidth]{m32ce}
\end{figure}
@iamwrm
iamwrm / network.md
Last active Aug 20, 2018
doc about using linux ( as a desktop maybe?)
View network.md

for scientific surfing:

instsall shadowsocks-libev config it to run on 127.0.0.1:1080

however, with firefox, i could still only go on the sites that are not blocked, though I make sure that my ip is outside the greatwall. I contribute this problem to DNS pollution. For the log of sslocal shows that google.com is redirected to 0.0.0.0. With chrome, this problem never happens. Maybe chrome has some dns resolver overiding?

@iamwrm
iamwrm / index.md
Last active Aug 20, 2018
Problems to solve
View index.md

Unix sockets and its programming

Since cpu and the operating system is dividing the clock cycle to multiple devices, how to make the sound seems continuous?

Maybe it's done by sending "discrete" data to the audio card, and the audio card plays it "continuously"?

@iamwrm
iamwrm / 0 Linux-On-MBP-Late-2016.md
Created Jul 27, 2018 — forked from roadrunner2/0 Linux-On-MBP-Late-2016.md
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)
View 0 Linux-On-MBP-Late-2016.md

Introduction

This is about documenting getting Linux running on the late 2016 and mid 2017 MPB's; the focus is mostly on the MacBookPro13,3 and MacBookPro14,3 (15inch models), but I try to make it relevant and provide information for MacBookPro13,1, MacBookPro13,2, MacBookPro14,1, and MacBookPro14,2 (13inch models) too. I'm currently using Fedora 27, but most the things should be valid for other recent distros even if the details differ. The kernel version is 4.14.x (after latest update).

The state of linux on the MBP (with particular focus on MacBookPro13,2) is also being tracked on https://github.com/Dunedan/mbp-2016-linux . And for Ubuntu users there are a couple tutorials (here and here) focused on that distro and the MacBook.

Note: For those who have followed these instructions ealier, and in particular for those who have had problems with the custom DSDT, modifying the DSDT is not necessary anymore - se

@iamwrm
iamwrm / emacs.md
Last active Feb 6, 2017
emacs hints
View emacs.md

Keybidings

File related operations

SPC f f to find a file start from the current directory

SPC f L find the file across the whole Mac system
@iamwrm
iamwrm / numpy.py
Last active Dec 20, 2018
python.md
View numpy.py
np.zero((3, 5), 7)
np.full((3, 5), 7)
import numpy as np
np.add(first, second)