Skip to content

Instantly share code, notes, and snippets.

@HaVonTe1
Last active November 4, 2015 06:35
Show Gist options
  • Save HaVonTe1/e26a85534dc246a9850a to your computer and use it in GitHub Desktop.
Save HaVonTe1/e26a85534dc246a9850a to your computer and use it in GitHub Desktop.
HaVonTe Snippets
ssh [email protected] ls --format single-column /usr/local/webtrekk/glassfish4/glassfish/domains/domain1/applications/RecoRDFS/WEB-INF/lib
commons-lang3-3.3.2.jar
gson-2.2.4.jar
guava-18.0.jar
jackson-annotations-2.2.3.jar
jackson-core-2.2.3.jar
jackson-databind-2.2.3.jar
jackson-jaxrs-base-2.2.3.jar
jackson-jaxrs-json-provider-2.2.3.jar
jackson-module-jaxb-annotations-2.2.3.jar
logback-classic-1.0.13.jar
logback-core-1.0.13.jar
mongo-java-driver-2.11.2.jar
monitor-api-1.2.0+build138.11dc564.jar
RecoRDFS-API-1.2.0+build138.11dc564.jar
RecoRDFS-Billing-Logger-1.2.0+build138.11dc564.jar
RecoRDFS-Feeds-1.2.0+build138.11dc564.jar
RecoRDFS-Providers-1.2.0+build138.11dc564.jar
slf4j-api-1.7.7.jar
jar tf RecoRDFS.war | grep jar
WEB-INF/lib/jackson-module-jaxb-annotations-2.2.3.jar
WEB-INF/lib/jackson-jaxrs-base-2.2.3.jar
WEB-INF/lib/commons-lang3-3.3.2.jar
WEB-INF/lib/RecoRDFS-Billing-Logger-1.2.0-SNAPSHOT.jar
WEB-INF/lib/RecoRDFS-API-1.2.0-SNAPSHOT.jar
WEB-INF/lib/slf4j-api-1.7.7.jar
WEB-INF/lib/gson-2.2.4.jar
WEB-INF/lib/guava-18.0.jar
WEB-INF/lib/RecoRDFS-Providers-1.2.0-SNAPSHOT.jar
WEB-INF/lib/jackson-annotations-2.2.3.jar
WEB-INF/lib/logback-classic-1.0.13.jar
WEB-INF/lib/logback-core-1.0.13.jar
WEB-INF/lib/monitor-api-1.2.0-SNAPSHOT.jar
WEB-INF/lib/jackson-jaxrs-json-provider-2.2.3.jar
WEB-INF/lib/RecoRDFS-Feeds-1.2.0-SNAPSHOT.jar
WEB-INF/lib/jackson-core-2.2.3.jar
WEB-INF/lib/mongo-java-driver-2.11.2.jar
WEB-INF/lib/jackson-databind-2.2.3.jar
find . -name "*.php" -print | xargs sed -i 's/foo/bar/g'
sudo su
fdisk –l #command to check the SD card node.
umount /dev/sdxx # to unmount all the partitions of the SD card.
fdisk /dev/sdx
# Use the o command to delete all partition of SD
# card and use the n command to add one new partition.
# Use the w command to save #change.
mkfs.vfat /dev/sdx1 # command to format the new created partition of SD card as FAT32.
#(x should be replaced according to your SD card node as discovered in point vi above)
fdisk –l #command to check the SD card node.
# Verify if the hash key of the zip file is the same as shown on the downloads page (optional).
sha1sum [path]/[imagename]
# This will print out a long hex number which should match the "SHA-1" line for the SD image you have downloaded.
umount /dev/sdxx # to unmount all the partitions of the the SD card
sudo dd bs=4M if=[path]/[imagename] of=/dev/sdx
# command to write image file to SD card. Wait patiently to successfully complete writing.
# Please note that block size set to 4M will work most of the time,
# if not, please try 1M, although 1M will take considerably longer.
# You can use the sudo pkill –USR1 –n –x dd command to check progress
grep -r -i 'Suchstring' ./
mongodump -d some_database -c some_collection
#[Optionally, zip the dump (zip some_database.zip some_database/* -r) and scp it elsewhere]
#Then restore it:
mongorestore -d some_other_db -c some_or_other_collection dump/some_collection.bson
#Existing data in some_or_other_collection will be preserved. That way you can "append" a collection from one database to another.
@HaVonTe1
Copy link
Author

tar cvzf bkp.tgz bkp/

@HaVonTe1
Copy link
Author

HaVonTe1 commented Nov 4, 2015

--authenticationDatabase=admin -u admin -p geheim --db mac_live --out ./dump.mac_live.2015-10-26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment