This file contains 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
curl --header "Content-Type: application/json" --request POST --data '{"username":"tyrion","password":"Tyrion Lanister"}' http://localhost:8080/users | jq |
This file contains 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
mvn archetype:generate \ | |
-DarchetypeGroupId=org.codehaus.mojo.archetypes \ | |
-DarchetypeArtifactId=pom-root \ | |
-DgroupId=com.balamaci.reactive \ | |
-DarchetypeVersion=RELEASE | |
#cd inside created dir above | |
mvn archetype:generate \ | |
-DarchetypeGroupId=org.apache.maven.archetypes \ |
This file contains 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
nginx reads the config from /etc/nginx/sites-enabled/ | |
usually there are just links from /etc/nginx/sites-available. | |
when generating certificates with certbot, choose 'webroot' option if there is a directory that is served. | |
Cerbot will place the test files there - and will ask the disk location where the exposed dir is located like '/var/www' | |
certbot generates certificates in /etc/letsencrypt/live/balamaci.eu/ | |
and you need to reference them in nginx site config: |
This file contains 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
avconv -rtsp_transport tcp -i rtsp://localhost:5554/Streaming/channels/101 -c copy -map 0 -f segment -segment_time 120 "./security/capture2-%03d.mkv" |
This file contains 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
#show all programs listening TCP ports | |
lsof -Pan -i tcp |
This file contains 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
proc /proc proc defaults 0 0 | |
/dev/mmcblk0p1 /boot vfat defaults 0 2 | |
/dev/mmcblk0p2 / ext4 defaults,noatime 0 1 | |
# a swapfile is not a swap partition, so no using swapon|off from here on, use dphys-swapfile swap[on|off] for that | |
none /var/run tmpfs size=1M,noatime,mode=0755 0 0 | |
none /var/log tmpfs size=1M,noatime,mode=0755 0 0 | |
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0 | |
/dev/sda1 /mnt/storage ext4 defaults,nofail 0 2 |
This file contains 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
#!/bin/bash | |
MYDIR=$(dirname $0) | |
STATFILE=$MYDIR/command.pid | |
COMMAND_MARK="myprocess.jar" | |
MEMORY_OPTIONS="-Xms32m -Xmx256m" | |
MISC_OPTIONS="-Djava.awt.headless=true" | |
LOG_FILE=console.log |
This file contains 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
# | |
useradd -m -d /home/sbalamaci -s /bin/bash sbalamaci | |
#add to users | |
sudo usermod -a -G sudo sbalamaci | |
#generate ssh keys | |
ssh-keygen -t rsa -C "[email protected]" | |
#java8 |
This file contains 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
ssh flyby@inita 'bash -s' << 'DELIMITAT' | |
cd /home/flyby/airprice | |
/home/flyby/airprice/flyby-agent/command.sh stop | |
/home/flyby/airprice/flyby/command.sh stop | |
/home/flyby/airprice/build.sh | |
/home/flyby/airprice/flyby/command.sh start | |
/home/flyby/airprice/flyby-agent/command.sh start | |
DELIMITAT | |
This file contains 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
Writting an image to an sdcard: | |
sudo dd bs=4M if=2014-01-07-wheezy-raspbian.img of=/dev/mmcblk0 | |
Backing up an sdcard | |
sudo dd if=/dev/mmcblk0 bs=1M | gzip -c > raspbian-2015-12-19.img.gz |
NewerOlder