Skip to content

Instantly share code, notes, and snippets.

@iamwrm
iamwrm / keybase.md
Created January 5, 2019 02:42
keybase claim

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 December 31, 2018 04:09
docker related
sudo groupadd docker
sudo gpasswd -a $USER docker
@iamwrm
iamwrm / m1.md
Created December 19, 2018 15:22
macOS kernel extension disable

sudo kextunload -b com.apple.filesystems.smbfs

@iamwrm
iamwrm / update.sh
Last active December 19, 2018 08:49
rsync
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 December 7, 2018 03:36
Latex userful sripts
Insert pictures
\begin{figure}[H]
\centering
\includegraphics[width=1\textwidth]{m32ce}
\end{figure}
@iamwrm
iamwrm / network.md
Last active August 20, 2018 07:47
doc about using linux ( as a desktop maybe?)

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 August 20, 2018 07:46
Problems to solve

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 July 27, 2018 02:39 — forked from roadrunner2/0 Linux-On-MBP-Late-2016.md
Linux on MacBook Pro Late 2016 and Mid 2017 (with Touchbar)

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 February 6, 2017 04:52
emacs hints

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 December 20, 2018 10:46
python.md
np.zero((3, 5), 7)
np.full((3, 5), 7)
import numpy as np
np.add(first, second)