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
@Manuel4131
Manuel4131 / gist:67bc86b05e5a46a518d7
Last active February 16, 2022 01:01
How to install GNU gettext on MAC OSX
  1. Wget ftp://ftp.gnu.org/pub/gnu/gettext/gettext...t-0.12.1.tar.gz
  2. Untar file as tar -zxvf gettext-0.12.1.tar.gz
  3. cd to the directory containing the package's source code and type ./configure to configure the package for your system. If you're using csh on an old version of System V, you might need to type sh ./configure instead to prevent csh from trying to execute configure itself.

Running configure takes awhile. While running, it prints some messages telling which features it is checking for.

  1. Type make to compile the package.
  2. Optionally, type make check to run any self-tests that come with the package.
  3. Type make install to install the programs and any data files and documentation.

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:aea5169ebcfb8ac9faba5188f8533186
Last active December 15, 2020 03:44
Install tensorflow for MacOS

Install it with the command.

pip3 install tensorflow

Reference the official installation here https://bit.ly/2Aje82T

Abstract

Install TensorFlow Assuming the prerequisite software is installed on your Mac, take the following steps:

@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 + ]