Skip to content

Instantly share code, notes, and snippets.

let show_all_text = document.querySelectorAll('span[style="display: none;"]')
for ( let i=0; i<show_all_text.length; i++)
{show_all_text[i].style=null}
OR
document.querySelectorAll('span[style="display: none;"]').forEach(x=>x.style=null)
MAL updated their website
# add blank lines between lines
find: \R
replace: $0$0
# add string to blank lines
find: ^(?:[\t ]*(?:\r?\n|\r))+
replace: the string
# add string at the end of each line
find: $
[Very important. I repeat, this is very important]
YOU CAN NOT USE TWO REGEX EXPRESSIONS AT THE SAME TIME, BUT YOU CAN TRY TO BE AS SPECIFIC AS POSSIBLE. AND TRY TO BE FLEXIBLE AND MIX AND MATCH THE EXPRESSIONS
AND IF WORST COME TO WORST YOU CAN REGEX A REGEX OUTPUT
#If you use any regex and the regex is not matching anything, or it is not matching the expected behaviour. In that case, you must check if the regex is lazy or greedy and the regex flags
g - Global. Finds all matches instead of stopping after the first.
i - Ignore case. /[a-z]/i is equivalent to /[a-zA-Z]/.
GREP WILL NOT WORK WITHOUT THE SINGLE QUOTES
JUST LIKE SED USE SINGLE QUOTE AND NEVER USE DOUBLE QUOTES
grep -P 'your regex'
Print a list of matched files with its match string and with its context, The whole file content will be printed, and the matched string will be coloured differently
grep -ri 'regex'
Print a list of matched files without its match string
grep -ril 'regex'
wget -kEp "http://e-shuushuu.net/search/results/?page=1&tags=28706+!6+!60+!25+!15959+!182683+!71+!73+!29+!27+!42+!3371+!11+!10+!52+!67"
wget -kEp "http://e-shuushuu.net/search/results/?page=1&tags=28706+!6+!60+!25+!15959+!182683+!71+!73+!29+!27+!42+!3371+!11+!10+!52+!67"
STEP 4 AND 5 ARE VERY IMPORTANT. I REPEAT STEP 4 AND 5 ARE VERY IMPORTANT
THE CUSTOM IS ISO WILL NOT BOOT WITHOUT STEP 5 AND WITHOUT STEP 4 THE INSTALLER WILL NOT FINISH THE INSTALLATION PROCESS.
0-disable screen saver
disable start up programs
show trash on desktop
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge
sudo apt install bleachbit
Customize nemo
1-download from https://cloud-images.ubuntu.com/minimal/releases/
2-mount the squashfs file
3- use rsync to copy the files from the squasfs the disk
sudo rsync -av -A -X /media/mint/disk/ /media/mint/2fa5f7a5-27ef-4ff9-97f0-ade7c9c593c6
4-cd into the disk and open supersuer terminal and past
mount -t proc /proc proc/
mount -t sysfs /sys sys/
mount --rbind /dev dev/
mount --rbind /run run/
#Replace anything inside the dom jquery is required
$("body").html($("body").html().replace(/\?a=view/g,''));
#Replace anything inside the dom
document.body.innerHTML = document.body.innerHTML.replace(/\?a=view/g,'')
#Remove div with a particular text in it jquery is required
$("div:contains('Example')").remove()
#select element by attribute
sed -i 's/original/new/g' file.txt
SED WILL NOT WORK WITHOUT THE SINGLE QUOTES
JUST LIKE GREP USE SINGLE QUOTE AND NEVER USE DOUBLE QUOTES
There is only one way to replace multiple strings in a file using sed. Or a multiple file s if you use the find command.
sed -i -e 's/abc/new/g' -e 's/nothing/new/g' theisatest.txt
--no-mtime