Skip to content

Instantly share code, notes, and snippets.

View Sounds-of-Science's full-sized avatar

Fred Valentin Sounds-of-Science

View GitHub Profile
@Sounds-of-Science
Sounds-of-Science / gist:0362e88bb6f490dea0f0043a5be2dd26
Last active February 8, 2022 14:35
How to disable Adobe Creative Cloud during startup on the Mac
# Unload creative cloud at startup
launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl unload -w /Library/LaunchAgents/com.adobe.ccxprocess.plist
# ! Need to restart the mac
# Load creative cloud at startup
launchctl load -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist
launchctl load -w /Library/LaunchAgents/com.adobe.ccxprocess.plist
# Unload XP-PEN Pen Tablet software at startup
#
mkfile [filesize] [filename].[file-extension]
#ex : mkfile 1m filename.ext
# commande : xattr
# affiche les attributs étendus du fichier
xattr /path_to/filename
# supprimer un attribut
xattr -d com.apple.quarantine /path_to/filename
# supprimer tous les attributs du fichier
xattr -c /path_to/filename
afinfo /path_to/filename.format | grep "bit rate"
# To remember this simple trick, RSYNC cmd
#
# -a option will use recursive mode, preserve any symbolic links, preserves file and directory permissions,
# preserves the timestamp, and preserve the owner and group.
# -v for verbose mode or info=progress2 for rsync 3.0+
rsync -av --exclude ".DS_Store" --progress /Volumes/Source/ /Volumes/TargetBackup/
@Sounds-of-Science
Sounds-of-Science / verifyHash_opensslSHA256.sh
Created January 18, 2014 18:29
Verify SHA256 (signed hash file) with openssl on Linux/os X
openssl dgst -sha256 /path/to/file
@Sounds-of-Science
Sounds-of-Science / Linux-WebServer
Created January 14, 2014 08:43
Display tcp connections on the machine and their states.
# Display tcp connections on the machine and their states.
netstat -an | awk '/tcp/ {print $6}' | sort | uniq -c
@Sounds-of-Science
Sounds-of-Science / findExternalIPaddress.sh
Created December 30, 2013 13:11
Tip to find ip address on a cloud server.
dig +short @resolver1.opendns.com myip.opendns.com
@Sounds-of-Science
Sounds-of-Science / windows-shell.bat
Last active January 1, 2016 10:49
Windows commands... general list of interesting commands
:: Commande DOS pour récupérer les différents moniteurs de performance sur une machine Windows :
typeperf -qx>>perfcounter.txt
:: Commande pour afficher les serveurs qui hébergent LDAP dans le domaine
:: Peut être exécuté sans le "domaine name" et retourne tout les domaines disponibles
nslookup
> set types=all
> _ldap._tcp.<your domain name>
@Sounds-of-Science
Sounds-of-Science / mysql-dump.sql
Last active January 1, 2016 10:29
MySQL Dump - INNODB
-- The .sql file will contain drop table, create table and insert command for all the tables in the specified database.
-- if necessary, install mysqldump
sudo apt-get install mysqldump
-- backup:
mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql
-- restore: