git config user.name "New User"
git config user.email "newuser@mail.com"
git log
git rebase -i 1f1357 # use --root to start from frist commit in History
# change the word 'pick' to 'edit' (you might want to use the shortform 'e'), save and exit
git commit --amend --reset-author --no-edit
git rebase --continue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export let SomeIcons = (): JSX.Element => { | |
let allIcons: ReactNode[] = [ | |
<Flight/>, // Airplane Icon | |
<Flight/>, | |
<Flight/> | |
]; | |
return ( | |
<Grid container> | |
{props.allIcons[0]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {Fragment} from "react"; | |
interface IGenericHookProps<TData> { | |
data: TData, | |
} | |
// Trailing comma in <TData,> to sidestep/avoid the JSX ambiguity. Only works in newer TypeScript-Compilers. Source: https://stackoverflow.com/questions/32308370/what-is-the-syntax-for-typescript-arrow-functions-with-generics#comment99104831_45576880 | |
export let GenericHook = <TData,>(props: PropsWithChildren<IGenericHookProps<TData>>): JSX.Element => { | |
return ( | |
<Fragment></Fragment> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pattern: ((?<=\D|^)\d(?=\D|\n)) // DO NOT forget () or $1 won't capture | |
Replace/Capture (VsCode): $1 | |
Before: | |
4 | |
2 4 0 6 0 7 0 13 0 0 0 8 0 0 16 12 | |
0 0 0 8 0 0 12 0 9 0 0 16 0 0 0 6 | |
0 0 0 11 0 4 0 0 0 7 12 0 0 3 13 0 | |
0 0 14 15 0 0 0 0 2 0 0 11 0 8 0 0 | |
5 0 1 0 0 0 10 0 0 0 0 0 0 0 6 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in {1..9}; do mkdir "Execise0$i"; done | |
# see https://www.cyberciti.biz/faq/linux-unix-bash-for-loop-one-line-command/ |
Taoguang Chen <@chtg57> - Write Date: 2016.7.27 - Release Date: 2016.8.18
PHP's session php/php_binary handlers wrongly handles the session name cause arbitrarily session data injection.
Affected is PHP 5 < 5.6.25
Affected is PHP 7 < 7.0.10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
while true; do lscpu | grep MHz; sensors | grep "Tctl:"; cat /proc/cpuinfo | grep "cpu MHz"; sleep 1; done | |
# even better command: | |
watch -n 1 -d 'lscpu | grep MHz; sensors | grep "Tctl:"; cat /proc/cpuinfo | grep "cpu MHz";' # see `man watch` for more info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% Taken from https://ctan.net/macros/latex/contrib/todonotes/todonotes.pdf | |
\newcommand{\todoredefined}[2][] | |
{\todo[color=red, #1]{#2}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
src_files := $(wildcard *.mmd) | |
out_files := $(patsubst %.mmd,output/%.png,$(src_files)) | |
.PHONY: all clean | |
all: $(out_files) | |
output/%.png: %.mmd | |
mkdir -p $(dir $@) | |
mmdc -c ./mermaidconfig.json \ |