In a terminal run:
cd /etc/pam.d/
sudo vim sudo
Append the following line to the file
# Install command: | |
# curl https://gist.githubusercontent.com/florianpasteur/c9764ddc56042a075662e1adcfbcc0b4/raw -o .git/hooks/post-commit && chmod +x .git/hooks/post-commit | |
IS_AMEND=$(ps -ocommand= -p $PPID | grep -e '--amend'); | |
if [ -n "$IS_AMEND" ]; then | |
exit 0; | |
fi | |
if git diff package.json package-lock.json; then |
If the sound is weird on mac using a bluetooth headset try running:
sudo defaults write bluetoothaudiod "Enable AptX codec" -bool true
sudo defaults write bluetoothaudiod "Enable AAC codec" -bool true
M201 X500.00 Y500.00 Z100.00 E5000.00 ;Setup machine max acceleration | |
M203 X500.00 Y500.00 Z10.00 E50.00 ;Setup machine max feedrate | |
M204 P500.00 R1000.00 T500.00 ;Setup Print/Retract/Travel acceleration | |
M205 X8.00 Y8.00 Z0.40 E5.00 ;Setup Jerk | |
M220 S100 ;Reset Feedrate | |
M221 S100 ;Reset Flowrate | |
M140 S60 ; Preheat bed | |
M104 S210; Preheat head |
" URL: https://vim.wikia.com/wiki/Example_vimrc | |
" Authors: https://vim.wikia.com/wiki/Vim_on_Libera_Chat | |
" Description: A minimal, but feature rich, example .vimrc. If you are a | |
" newbie, basing your first .vimrc on this file is a good choice. | |
" If you're a more advanced user, building your own .vimrc based | |
" on this file is still a good idea. | |
"------------------------------------------------------------ | |
" Features {{{1 | |
" |
#!/bin/bash | |
# START=$(perl -MTime::HiRes=time -e 'printf "%.9f\n", time') | |
####################################################### | |
# EXPORTS | |
####################################################### | |
# Expand the history size |
// Sources: https://gist.github.com/florianpasteur/118d0e29313c3fb052f944bc001cde88 | |
function findElementByText(text, searchStart = document.body, _document = document, ignoreSpace = false) { | |
return _document | |
.evaluate( | |
`//*[${ignoreSpace ? 'normalize-space' : 'text'}()="${text}"]`, | |
searchStart, | |
null, | |
XPathResult.ANY_TYPE, | |
null |
// Example type | |
type UserInfo = { | |
username: string, | |
email: string | |
}; | |
type Present<T> = { | |
exists: true, | |
value: T | |
}; |
// Example type | |
type UserInfo = { | |
username: string, | |
email: string | |
}; | |
type Present<T> = { exists: true, value: T }; | |
type Absent = {exists: false}; | |
type Optional<T> = Present<T> | Absent; |
tag = "Some value"; | |
replacetag = '<span class="hightlighttag">' + tag + '</span>'; | |
console.log(textarea.value.split(tag).join(replacetag)) |