- moulinette - Moulinette web interface
- 42evaluators - 42evaluators is originialy created to find an active student to set up a correction
- 42url - U42url.com is a fast and free url shortener
- 42api - The 42 API provide programmatic access to read and write 42's data
- 42stud - A minimal, clean, and student driven list of usefull
- 42tools - Collection of 42 tools
- 42l - Association étudiante loi 1901 d'intérêt général ayant pour mission de promouvoir la culture libre et l'éthique.
- recruitin - Easily use Google to search profiles on LinkedIn
- onlinegdb - Online compiler and debugger for c/c++
- stacked-crooked - Online compiler for c/c++
- robozzle.com - Robozzle is a robot-programming game
man ascii
- explainshell.com - Write down a command-line to see the help text that matches each argument
- command-not-found.com - Install any command on any operating system.
- Install Homebrew properly on your 42 session
curl -fsSL https://rawgit.com/kube/42homebrew/master/install.sh | zsh
Command (⌘) + Space
Ctrl + Z
Get back to shellfg
Get back to vimi
Insert modev
Visual modeCtrl + Esc :w
SaveCtrl + Esc :x
Save and quitCtrl + Esc :q
Quit without savingCtrl + Esc :!q
Force quityy
Copyp
Pastdd
Delete linedw
Delete wordx
Delete charr
Replace char:%s/foo/bar/g
Search and replace
:set number
Show line number:syntax on
Turn on syntax highlighting:set ruler
Show numbers of columns:set mouse -=a
Allow mouse copy/past
- Open new terminal and type
cd ~/
- Create an RSA key
ssh-keygen -b 2048 -t rsa
- Complete fiedls.
- Copy content of the public key
cat ~/.ssh/id_rsa.pub
- Go to profile.intra.42.fr
- Add the copied public key
git config --global core.excludesfile ~/.gitignore_global
git diff
# first clone
git clone --recurse-submodules
# already cloned
git submodule init
git submodule update
git reset --soft HEAD~1
git stash
git stash pop
git tag -a v1.4 -m "my version 1.4"
git tag
git push --tags <repo-name>
# delete remote branch
git push -d origin <branch_name>
# delete local branch
git branch -d <branch_name>
git remote set-url origin <[email protected]:username/project.git>
gcc -g3 -fsanitize=address
On Unix-like operating systems, the diff command analyzes two files and prints the lines that are different. In essence, it outputs a set of instructions for how to change one file to make it identical to the second file.
diff -u file1.txt file2.txt
- Install
sudo apt install valgrind # Ubuntu, Debian, etc.
sudo yum install valgrind # RHEL, CentOS, Fedora, etc.
sudo pacman -Syu valgrind # Arch, Manjaro, Garuda, etc
- Usage
valgrind --leak-check=full \
--show-leak-kinds=all \
--track-origins=yes \
--verbose \
--log-file=valgrind-out.txt \
./executable exampleParam1
- Compile
gcc -g main.c
-o - Launch lldb
lldb <prog> <arg1> <arg2>
- Set breakpoint
b <funct_name>
- Launch the executable in the debugger
run
- Some helpful commands
expression -- Evaluate an expression on the current thread. Displays
any returned value with LLDB's default formatting.
frame -- Commands for selecting and examing the current thread's
gui -- Switch into the curses based GUI mode.
help -- Show a list of all debugger commands, or give details
about a specific command.
target -- Commands for operating on debugger targets.
b -- Set a breakpoint using one of several shorthand formats.
bt -- Show the current thread's call stack. Any numeric argument
displays at most that many frames. The argument 'all' displays
all threads. Use 'settings set frame-format' to customize the
printing of individual frames and 'settings set thread-format'
to customize the thread header.
c -- Continue execution of all threads in the current process.
display -- Evaluate an expression at every stop (see 'help target
stop-hook'.)
j -- Set the program counter to a new address.
kill -- Terminate the current target process.
l -- List relevant source code using one of several shorthand formats.
n -- Source level single step, stepping over calls. Defaults to
p -- Evaluate an expression on the current thread. Displays any
returned value with LLDB's default formatting.
q -- Quit the LLDB debugger.
r -- Launch the executable in the debugger.
s -- Source level single step, stepping into calls. Defaults to
v -- Show variables for the current stack frame. Defaults to all
arguments and local variables in scope. Names of argument,
local, file static and file global variables can be specified.
Children of aggregate variables can be specified such as
'var->child.x'. The -> and [] operators in 'frame variable' do
not invoke operator overloads if they exist, but directly access
the specified element. If you want to trigger operator
overloads use the expression command to print the variable
instead.
It is worth noting that except for overloaded operators, when
printing local variables 'expr local_var' and 'frame var
local_var' produce the same results. However, 'frame variable'
is more efficient, since it uses debug information and memory
reads directly, rather than parsing and evaluating an
expression, which may even involve JITing and running code in
the target program.
- Learn the lldb debugger basics in 11 minutes
- GDB to LLDB command map
- How to find Segmentation Error in C & C++ ? (Using GDB)
- Pony LLDB Cheat Sheet
- How to use the GDB debugger - basics
Print Screen
to take a screenshot of the desktop.Alt + Print Screen
to take a screenshot of a window.Shift + Print Screen
to take a screenshot of an area you select.
Shift + Command + 3
to take a screenshot of the desktop.Shift + Command + 4
to take a screenshot of a portion of the screenShift + Command + 4 + Space
to take a screenshot of a window or menu
Ctrl + Shift + S
to take a screenshot of full page.
- kevinushey - Debugging with lldb
- stackoverflow - How to Run Valgrind
In summary, if you want to contribute to a project, the simplest way is to:
Find a project you want to contribute to
Fork it
Clone it to your local system
Make a new branch
Make your changes
Push it back to your repo
Click the Compare & pull request button
Click Create pull request to open a new pull request
sudo apt install universal-ctags
ctags -x -f - --c-kinds=f push_swap.c
ctags -x --c-kinds=fp push_swap.c | awk '{$1=$2=$3=$4=""; print $0}' | awk '{$1=$1};1' | sed -z 's/\n/;\n/g'
ctags -x --c-kinds=fp utils.c | awk '{$1=$2=$3=$4=""; print $0}' | awk '{$1=$1};1' | sed -z 's/\n/;\n/g'
open ~/.zshrc using the below command
vim ~/.zshrc
Add the following path
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
And source it using below command
source ~/.zshrc
Now close the terminal and reopen and run code . command should work properly.