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 -X PATCH http://localhost:8080/Users/7234e4cd-eb7f-4a96-953e-3bd11439efcf -H 'Content-Type: application/json' -d @- <<BODY | |
{ | |
"emails": [ | |
"a@b.com", | |
"b@c.com" | |
] | |
} | |
BODY |
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
Why would you need this? | |
Because NxServer or VNC needs a special client installed in order to connect. | |
If your destination Ubuntu machine has multiple displays installed, you will eventually go crazy configuring it to be correctly seen from a Windows machine with a single display. It will show you 2 desktops on a single monitor... | |
Enabling Windows style RDP server in Ubuntu in easy. | |
Steps: | |
1. sudo apt-get install xrdp | |
2. cd ~ | |
3. echo "gnome-session --session=gnome-classic" > .xsession |
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
# inspired from http://nathanhoad.net/how-to-meld-for-git-diffs-in-ubuntu-hardy | |
# and http://gitguru.com/2009/02/22/integrating-git-with-a-visual-merge-tool/ | |
sudo apt-get install meld | |
# create a python script with the below content and name it diff.py | |
#!/usr/bin/python |
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
1) in file /var/lib/pgsql/9.3/data/postgresql.conf change the default value 'localhost' to '*' (all) as shown | |
listen_addresses = '*' | |
2) in file /var/lib/pgsql/9.3/data/pg_hba.conf add line: | |
host all all all password | |
3) if it still does not work, you bet it's iptables fault. so either stop it temporarily to verify this or add an exception for port 5432 |
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
# Inspired from http://blog.akquinet.de/2010/05/26/mastering-the-maven-command-line-%E2%80%93-reactor-options/ | |
# Build only specific modules: | |
mvn clean install -pl sub-module-name2 | |
mvn clean install -pl sub-module-name2,sub-module-name3 | |
# Build only starting from specific sub-module (resume from) | |
mvn clean install -rf sub-module-name2 | |
# Build dependencies (also make) |
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
1. Select new launch configuration | |
2. use /usr/bin/nohup for location | |
3. leave the working directory empty | |
4. for argument enter: | |
gnome-terminal --working-directory=${resource_loc} | |
5. Save and then you are able to run it while having different locations selected in package explorer: this will open the terminal in the corresponding directories |
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
Sharing your Git repository using Git daemon (for pull & push) | |
1. In a git repository run the following command to share it in read-only mode (pull only): | |
git daemon --export-all --base-path=. | |
(from the folder with the project to be shared) | |
and then clone directly, like: |
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
# run: | |
sudo netstat -lpn |grep :8080 | |
# this will output something like: | |
tcp6 0 0 :::8080 | |
:::* LISTEN 6782/java | |
# interpretation: |
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
git checkout HEAD path/to/file | |
# Without HEAD it's not working because the file is not there anymore |
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
# packages from localhost to localhost | |
sudo tcpdump -vvv -A -i lo port 8080 | |
# packages from localhost to somewhere else | |
sudo tcpdump -vvv -A host 192.168.1.101 | |
# packages coming and going on a specific port, specific interface | |
sudo tcpdump -vvv -A -i eth0 'port 8080' | |
# packages coming and going on a specific port, any interface |
NewerOlder