Skip to content

Instantly share code, notes, and snippets.

@tanyuan
tanyuan / generate-mean-csv.sh
Last active February 21, 2016 07:21
Generate a CSV for experiment result.
#!/bin/bash
# Compute means of experiment data CSVs in a directory into a CSV.
# Example: ./generate-mean-csv.sh data/rawdata/vib-3/
# CSV directory
dir=$1
# Write CSV header
echo "Date,User Id,Gender,Age,vibtime,waitingtime,Data Count,Accuracy (%)"
@tanyuan
tanyuan / csv-statistics.md
Created February 29, 2016 03:32
Useful CSV commands.

CSV Command Line Statistics

tree list a tree view of current directory recursively, better than ls.

Check line counts for all data:

    wc -l *.csv

Install Python toolkit csvkit for csv* commands.

@tanyuan
tanyuan / pacman.md
Created February 29, 2016 03:48
Useful commands for pacman and yaourt.

Arch Linux Pacman & Yaourt Package Manager

Pacman (Official)

Easter egg

Edit /etc/pacman.conf:

Under the # Misc options section, remove the # in front of Color and add the line ILoveCandy. Because Pac-Man loves candy.

@tanyuan
tanyuan / ranger.md
Created February 29, 2016 04:02
Notes on ranger the miller columns console file manager.

Ranger File Manager

Use Python 3. q to quit.

Shortcuts

File manipulation

  • Space: Select file or directory like Ctrl.
  • v/V: Select continuously like Shift.
  • yy: Copy files.
@tanyuan
tanyuan / GitHub-Project-Creation-Flow.png
Last active October 4, 2024 02:25
Useful git and GitHub commands.
GitHub-Project-Creation-Flow.png
@tanyuan
tanyuan / blender.md
Last active January 19, 2024 10:11
Tips for using Blender the open source 3D animation software.

Blender 3D Animation Software

Check out videos: Introduction to Blender « CGCookie.

Setup

  • File > User Preference
    • Input > Mouse Left Select
    • System > International Fonts to allow Chinese file name.
@tanyuan
tanyuan / stow.md
Last active August 1, 2024 22:40
How to use GNU Stow.

GNU Stow: maintain dotfiles

Put all dotfiles in a specific folder so it is easy to use version control tool like git.

Steps

  1. Create directory ~/dotfiles/.
  2. Copy dotfiles into directories like:
@tanyuan
tanyuan / network.md
Created March 5, 2016 17:05
Network conflict when installing desktop environment.

Network conclict

The only frustration installing Arch Linux is network conflict:

  • Console: netctl
  • GNOME: NetworkManager

Use systemctl to stop disable services.

@tanyuan
tanyuan / emacs.md
Created March 10, 2016 18:39
Emacs key bindings and troubleshooting

Emacs

Basic Key Bindings

  • Shortcut starts with C-x.

  • Command name starts with M-x.

  • Custom shortcut starts with C-c.

  • C-x C-c: Exit Emacs.

  • C-x C-f: Find file.

@tanyuan
tanyuan / emacs-lisp.md
Created March 10, 2016 18:43
Emacs Lisp basic

Emacs Lisp

Lisp is List Processor. Lisp is a programmable programming language.

Emacs is built by Emacs Lisp, a dialect of Lisp.

something is a variable. Like a pointer point to something defined.

`something is "something" itself.