Skip to content

Instantly share code, notes, and snippets.

@spyesx
spyesx / message.txt
Last active June 13, 2018 11:15
Webpage monitor
Hello,
This page has changed:
https://www.domain.tld/example/of/a/url/
See yah !
@spyesx
spyesx / 01_create_split_archive.sh
Last active March 11, 2018 10:55
Take a folder then Split + DL + Combine + Unzip
#!/bin/bash
# Create a split zip archive
# https://explainshell.com/explain?cmd=zip+-r+-s+300+archive.zip+FolderName%2F
zip -r -s 300 archive.zip FolderName/
@spyesx
spyesx / fe.csv
Created March 11, 2018 09:29
Shows up differences between 2 CSV
We can make this file beautiful and searchable if this error is corrected: It looks like row 9 should actually have 10 columns, instead of 3 in line 8.
Nom (Code du fournisseur -> Fournisseur),Code article,Libellé,Type d'article,PV HT,Code barre,Stock virtuel,Stock réel,Unité,NEW
FARO Barcelona,050200101D,SIGN DALI SURFACE BLANC LED 17W 2700K 20°,Bien,"165,10000",8421776104686,"0,00","0,00",Unitaire,
FARO Barcelona,050200102D,SIGN DALI SURFACE NOIR LED 17W 2700K 20°,Bien,"165,10000",8421776104709,"0,00","0,00",Unitaire,
FARO Barcelona,050200103D,SIGN DALI SURFACE GRIS LED 17W 2700K 20°,Bien,"165,10000",8421776104723,"0,00","0,00",Unitaire,
FARO Barcelona,050200201D,SIGN DALI SURFACE BLANC LED 17W 2700K 56°,Bien,"165,10000",8421776104747,"0,00","0,00",Unitaire,
FARO Barcelona,050200202D,SIGN DALI SURFACE NOIR LED 17W 2700K 56°,Bien,"165,10000",8421776104761,"0,00","0,00",Unitaire,
FARO Barcelona,050200203D,SIGN DALI SURFACE GRIS LED 17W 2700K 56°,Bien,"165,10000",8421776104785,"0,00","0,00",Unitaire,
FARO Barcelona,050200301D,SIGN DALI SURFACE BLANC LED 17W 3000K 20°,Bien,"165,10000",8421776104808,"0,00","0,00",Unitaire,
FARO Barcelona,050200302D,SIGN DALI SU
@spyesx
spyesx / keepass_import_from_csv.php
Created March 11, 2018 09:26
Keepass import from CSV
<?php
$header = '<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<KeePassFile>
<Meta>
<Generator>KdbxWeb</Generator>
<HeaderHash>yW0Fz7nokpC3duCsku9B64+EAZZ7gvsmG0ZIIyZ8nKk=</HeaderHash>
<DatabaseName>jlb_import</DatabaseName>
<DatabaseNameChanged>2018-02-12T13:14:18Z</DatabaseNameChanged>
<DatabaseDescription/>
@spyesx
spyesx / folder_to_iso.sh
Created March 11, 2018 05:22
Creating ISO images from a folder in macOS. Useful for backups.
hdiutil makehybrid -o /destination/output.iso /source -iso -joliet
@spyesx
spyesx / rsync_backup.sh
Last active April 18, 2025 09:50
Rsync backup excluding node_modules
# Backup files
#https://explainshell.com/explain?cmd=rsync+-azuv+--delete+--progress+--exclude+%27node_modules%27
rsync -auvhp --delete --exclude=node_modules [source] [destination]
# Remove all node_modules folders
# https://explainshell.com/explain?cmd=find+.+-name+%22node_modules%22+-type+d+-prune+-exec+rm+-rf+%27%7B%7D%27+%2B
find . -name "node_modules" -type d -prune -exec rm -rf '{}' +
@spyesx
spyesx / keybase.md
Created February 27, 2018 04:13
Prove my GitHub identity to Keybase

Keybase proof

I hereby claim:

  • I am spyesx on github.
  • I am spyesx (https://keybase.io/spyesx) on keybase.
  • I have a public key whose fingerprint is CC78 93D7 BBFF AB03 BBFB CD38 59F8 E34C 5944 AE0C

To claim this, I am signing this object:

@spyesx
spyesx / youtube-dl_mp3_playlist.sh
Last active June 4, 2020 07:46
Download a playlist to MP3
# Download a playlist to MP3
brew install youtube-dl
# https://explainshell.com/explain?cmd=youtube-dl+--extract-audio+--audio-format+mp3
youtube-dl --extract-audio --audio-format mp3 https://www.youtube.com/playlist?list=[playlist ID goes here]
@spyesx
spyesx / raw_to_jpg.php
Last active September 23, 2024 07:56
Convert RAW images to JPG. Actually whatever you want as long as these formats are supported by ImageMagick.
<?php
/*
Convert RAW images to JPG. Actually whatever you want as long as these formats are supported by ImageMagick.
https://www.imagemagick.org/script/formats.php
Best used in a terminal to avoid Apache's timeout :)
ex : php raw_to_jpg.php
Folder tree
@spyesx
spyesx / folder_structure.sh
Last active December 12, 2020 06:15
Create a folder structure
# A
# ├── 1
# ├── 2
# └── B
# ├── 1
# └── 2
# https://explainshell.com/explain?cmd=mkdir+-p+.%2FA%2F%7B1%2C2%2CB%2F%7B1%2C2%7D%7D
mkdir -p ./A/{1,2,B/{1,2}}