mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-01-26 11:33:59 +00:00
Update cheatsheets
This commit is contained in:
21
tldr/caller
Normal file
21
tldr/caller
Normal file
@@ -0,0 +1,21 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# caller
|
||||
|
||||
> Print function context.
|
||||
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-caller>.
|
||||
|
||||
- Print the line and filename where the current function was called:
|
||||
|
||||
`caller`
|
||||
|
||||
- Print the line, function and filename where the current function was called:
|
||||
|
||||
`caller 0`
|
||||
|
||||
- Print the line, the function name and the filename of a function call `n` frames back:
|
||||
|
||||
`caller {{n}}`
|
||||
@@ -10,7 +10,7 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- List all captured core dumps:
|
||||
|
||||
`coredumpctl list`
|
||||
`coredumpctl`
|
||||
|
||||
- List captured core dumps for a program:
|
||||
|
||||
@@ -20,6 +20,10 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`coredumpctl info {{PID}}`
|
||||
|
||||
- Invoke debugger using the last core dump:
|
||||
|
||||
`coredumpctl debug`
|
||||
|
||||
- Invoke debugger using the last core dump of a program:
|
||||
|
||||
`coredumpctl debug {{program}}`
|
||||
|
||||
30
tldr/llvm-mc
Normal file
30
tldr/llvm-mc
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# llvm-mc
|
||||
|
||||
> LLVM Machine Code Playground. It provides a set of tools for working with LLVM machine code.
|
||||
> Part of LLVM.
|
||||
> More information: <https://llvm.org/docs/CommandGuide/llvm-mc.html>.
|
||||
|
||||
- Assemble assembly code file into object file with machine code:
|
||||
|
||||
`llvm-mc --filetype=obj -o {{path/to/output.o}} {{path/to/input.s}}`
|
||||
|
||||
- Disassemble object file with machine code into assembly code file:
|
||||
|
||||
`llvm-mc --disassemble -o {{path/to/output.s}} {{path/to/input.o}}`
|
||||
|
||||
- Compile LLVM bit code file into assembly code:
|
||||
|
||||
`llvm-mc -o {{path/to/output.s}} {{path/to/input.bc}}`
|
||||
|
||||
- Assemble assembly code from standard input stream and show encoding to standard output stream:
|
||||
|
||||
`echo "{{addl %eax, %ebx}}" | llvm-mc -show-encoding -show-inst`
|
||||
|
||||
- Disassemble machine code from standard input stream for specified triple:
|
||||
|
||||
`echo "{{0xCD 0x21}}" | llvm-mc --disassemble -triple={{target_name}}`
|
||||
30
tldr/timew
30
tldr/timew
@@ -8,22 +8,30 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
> A time tracking tool used to measure the duration of activities.
|
||||
> More information: <https://timewarrior.net/docs>.
|
||||
|
||||
- Start a new stopwatch, giving a tag name to the activity being tracked:
|
||||
- Start tracking an activity:
|
||||
|
||||
`timew start`
|
||||
|
||||
- Tag the current activity:
|
||||
|
||||
`timew tag {{activity_tag}}`
|
||||
|
||||
- Start tracking and tag a new activity:
|
||||
|
||||
`timew start {{activity_tag}}`
|
||||
|
||||
- View running stopwatches:
|
||||
|
||||
`timew`
|
||||
|
||||
- Stop the stopwatch with a given tag name:
|
||||
|
||||
`timew stop {{activity_tag}}`
|
||||
|
||||
- Stop all running stopwatches:
|
||||
- Stop the current activity:
|
||||
|
||||
`timew stop`
|
||||
|
||||
- View tracked items:
|
||||
- Track an activity in the past:
|
||||
|
||||
`timew track {{start_time} - {{end_time}} {{activity_tag}}`
|
||||
|
||||
- View tracked items of the day:
|
||||
|
||||
`timew summary`
|
||||
|
||||
- View report for the last day, week, current month, etc.:
|
||||
|
||||
`timew summary :{{today|yesterday|week|lastweek|month|lastmonth|year|lastyear}}`
|
||||
|
||||
Reference in New Issue
Block a user