- copy
go.modandgo.sumfiles from the offline PC to the internet PC
This file contains hidden or 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
| LATEST_VERSION=$(curl -s https://api.github.com/repos/so-fancy/diff-so-fancy/releases/latest | grep -Po '"tag_name": "v\K[^"]*') | |
| sudo curl -L -o /usr/local/bin/diff-so-fancy "https://github.com/so-fancy/diff-so-fancy/releases/download/v${LATEST_VERSION}/diff-so-fancy" | |
| sudo chmod +x /usr/local/bin/diff-so-fancy |
This file contains hidden or 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
| # source : https://unix.stackexchange.com/a/369653 | |
| # not a perfect solution but it helps | |
| python3 -c "from apt import cache;manual = set(pkg for pkg in cache.Cache() if pkg.is_installed and not pkg.is_auto_installed);depends = set(dep_pkg.name for pkg in manual for dep in pkg.installed.get_dependencies('PreDepends', 'Depends', 'Recommends') for dep_pkg in dep);print('\n'.join(pkg.name for pkg in manual if pkg.name not in depends))" |
This file contains hidden or 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
| tree -N --charset unicode |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # install : | |
| # sudo cp volume_backup.sh /usr/bin/volume_backup ; sudo chmod +x /usr/bin/volume_backup | |
| set -o errexit # set -e | |
| set -o nounset # set -u | |
| set -o pipefail | |
| # references : |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <title>crud</title> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <script type="text/javascript" src="jquery.min.js"></script> | |
| </head> | |
| <body> | |
| <div id="1"> |
This file contains hidden or 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
| FROM jenkins/jenkins:lts | |
| # yes it runs as root, sadly the only way I found to make it work | |
| USER root | |
| RUN apt-get -qq update && apt-get -qq -y install curl && apt-get clean | |
| RUN curl -sSL https://get.docker.com/ | sh |
This file contains hidden or 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 $(seq 1 10); do /usr/bin/time $SHELL -i -c exit; done |
- Go to https://www.leboncoin.fr/mes-annonces
- Open the console and paste :
var r = "";
[].forEach.call(document.getElementsByClassName("styles_ad__3wlgO"), function (el, i) {
var link = el.children[0].href;
var title = el.querySelector('a:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > p:nth-child(1)').title;
var price = el.querySelector('a:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(2) > div:nth-child(1) > div:nth-child(1) > div:nth-child(1) > span:nth-child(1) > span:nth-child(1)').innerText;
r += (i+1 + ". " + title + " - " + price + " : " + link + "\n");