Skip to content

Instantly share code, notes, and snippets.

View Manuel4131's full-sized avatar

alstonChang Manuel4131

View GitHub Profile
@Manuel4131
Manuel4131 / gist:4a0dda035999d9fd8f570328db5e9778
Created June 17, 2023 09:05
程式救星 c/c++/python/js/java 好便宜
各類程式作業
c/c++/python/js/java
請加入
https://line.me/R/ti/g/5Zc0f3tw63

Windows to UNIX Command Cheat Sheet

Windows PowerShell has several transition aliases that allow UNIX and CMD users to use familiar command names in Windows PowerShell. The most common aliases are shown in the table below, along with the Windows PowerShell command behind the alias and the standard Windows PowerShell alias if one exists.

CMD Command UNIX Command PowerShell Command PowerShell Alias
dir ls Get-ChildItem gci
@Manuel4131
Manuel4131 / gist:69e9e67426d7978392338ca2fec4cc60
Created October 21, 2019 08:00
Fast way to convert String[] to Arraylist
Ref:https://stackoverflow.com/questions/10530353/convert-string-array-to-arraylist
Use
```Java
Collections.add(ArrayList, String[]);
```
@Manuel4131
Manuel4131 / gist:cfada3268b2774e2ddf801dea313a8ee
Created October 21, 2019 07:18
[homework] regular expression
Reg is very common and wide use in many API and different langs.
Please make sure you can handle the special chars at least.
Test
Java String.split (REG)
https://stackoverflow.com/questions/3481828/how-to-split-a-string-in-java
String builder!
@Manuel4131
Manuel4131 / gist:01512646a248c6adbe7563430b55b745
Created October 20, 2019 04:22
[mac] Change screenshot path
defaults write com.apple.screencapture location
Now enter a space after "location" and drag the folder you created over to Terminal (which will insert the file path of the folder), or enter the location yourself.
Hit Enter on your keyboard, then type in:
killall SystemUIServer
Press Enter again and you're done.
@Manuel4131
Manuel4131 / terminal-git-branch-name.md
Created October 18, 2019 14:39 — forked from joseluisq/terminal-git-branch-name.md
Add Git Branch Name to Terminal Prompt (Mac)

Add Git Branch Name to Terminal Prompt (Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
Command Shortcut
Back
command + ←
command + [
Delete
Forward
command + →
command + ]
From: https://pythonconquerstheuniverse.wordpress.com/2009/10/03/static-vs-dynamic-typing-of-programming-languages/
Static vs. dynamic typing of programming languages
Posted on 2009/10/03 by Steve Ferg
Updated 2010-10-20 — added a bit more information about Boo’s type inferencing.
Updated 2012-04-08 — This post is an appendix to a post comparing Java and Python. Some comments on this post are actually comments on that other post.
There is widespread confusion or disagreement about the meanings of the words static, dynamic, strong and weak when used to describe the type systems of programming languages.
Here is a description of the way (or at least one of the ways) these terms are most commonly used.
@Manuel4131
Manuel4131 / mac terminal bash hotkey
Created July 25, 2019 05:04
Fuck Micro$oft Mac terminal
Shortcuts to move faster in Bash command line
Jan 4, 2012
Nowadays, I spend more time in Bash shell, typing longer commands. One of my new year resolutions for this year is to stop using left/right arrow keys to move around in the command line. I learned a few shortcuts a while ago.
Last night, I spent some time to read about “Command Line Editing” in the bash manual. The bash manual is a well-written piece of documentation. I think I should read it more often.
Well, here’s the new shortcuts I learned: