Skip to content

Instantly share code, notes, and snippets.

View qin-yu's full-sized avatar
🦏
Bioimage Safari

Qin Yu qin-yu

🦏
Bioimage Safari
View GitHub Profile
@qin-yu
qin-yu / configure-emacs.md
Last active April 6, 2020 20:16
Configure Emacs
@qin-yu
qin-yu / configure-git.md
Last active November 21, 2025 16:27
Configure Git and setup GitHub on new machine
@qin-yu
qin-yu / ask4-no-internet.md
Created March 16, 2020 23:20
How to Sign-in or Sign-up when ASK4 Network has Internet Connection

When, for example, try to connect to the ASK4 network but the pop-up window doesn't come up:

go to signup.ask4.com in your browser, whose IP address can be found in the local network.

@qin-yu
qin-yu / which-command.md
Created February 29, 2020 17:25
What if `which` cannot find a command in shell?

What if which cannot find a command in shell?

$ which emacs

returns nothing. This is because emacs is not a command, but an alias:

$ alias emacs
alias emacs='/Applications/Emacs.app/Contents/MacOS/Emacs -nw'
@qin-yu
qin-yu / julia-func-control-flow.md
Created February 5, 2020 14:17
disallow methods of local functions in different blocks
@qin-yu
qin-yu / fortran-system.md
Created January 23, 2020 16:32
Error: The CALL statement is invoking a function subprogram as a subroutine

SYSTEM is a function that returns an integer result, so declare a variable:

integer iret

and then change the call to:

iret = system(tmpline)

The Fortran standard does not allow calling a function as a subroutine. Indeed, earlier versions of our compiler did allow this, under some conditions, but the restrictions were not enough to avoid possible bad results and, after long debate, we decided that as the number of cases where this was harmless was small enough it was simpler to just make it an error. The problem has to do with mismatched assumptions about where arguments and return values get placed.

@qin-yu
qin-yu / auto-format-matlab.md
Created January 22, 2020 18:57
How to format MATLAB files?

How to format MATLAB files?

  1. Go to the GitHub repo of MBeautifier and clone/download it to anywhere as a library/package for MATLAB.
  2. Add the root directory of MBeautifier to the MATLAB path, e.g. on MacOS:
  • Add the folder /path/to/MBeautifier to the beginning of the search path on a UNIX® system:
oldpath = path;
path('/path/to/MBeautifier',oldpath)
  1. Perform formatting on the currently active page of MATLAB Editor. Command:
@qin-yu
qin-yu / shortcut-macos.md
Created January 21, 2020 15:53
Shortcuts not working on Mac/MacOS

Shortcuts not working on Mac/MacOS

One possibility is that the keyboard setting is bad for the massive amount of shortcuts we are using. The system default input source is ABC - Extended, which causes ++f to input a ̰ character. For example, in VS Code, to format a document, one uses ++f, which inputs ̰ instead of executing the shortcut.

Solution

Just change the ABC - Extended input source to ABC.

@qin-yu
qin-yu / search-math-symbol.md
Last active January 19, 2020 21:15
How to search for a mathematics symbol of which you don't know the name?

How to search for a mathematics symbol of which you don't know the name?

When typing in Latex, I often desperately wonder what are those weird mathematics symbols called???

Solution:

Go to the Detexify website and draw it!

p.s. it turned out to be in a GitHub repo: kirel/detexify.