In order to be able to download images from the internet,
-
add the below lines:
export http_proxy=http://proxy:8080
export https_proxy=http://proxy:8080
export no_proxy=*.lan
#1. dump | |
mysqldump -u root db_name > dump_name.sql | |
#2. restore | |
mysql -u root -p db_name < dump_name.sql |
# if you want queries executed in all you schemas to be case insensitive do this | |
$ sudo gedit /etc/mysql/my.cnf | |
edit the file adding the entry lower_case_table_names=1 just under the group definition: [mysqld] | |
[mysqld] | |
lower_case_table_names=1 |
# jmap is in $JAVA_HOME/bin/ (assumed in your path, but you can use the complete path if it's not) | |
jmap -dump:format=b,file=heap_dump.hprof <process ID> |
# 1. First make sure you copied the Gerrit commit-msg hook (from Gerrit to your local repos .git/hooks folder) | |
# 2. Make the code changes needed and then stage them using the usual command | |
git add . -A | |
# 3. Now commit them using amend and notice that the previous commit message is used but is suffixed with the Change-Id of your previous commit. Make sure you leave that (even if you modify the commit message). Note: modifying the commit message will overwrite the previous one. | |
git commit --amend | |
# 4. push your changes for review: | |
git push origin HEAD:refs/for/master |
# find all XML files from current directory (including its subdirectories recursively) by content 'sonar' | |
find . -name '*.xml' -print0 | xargs -0 grep 'sonar' |
find . -iname \*.sh | xargs chmod +x |
# 1) get line number of first relevant log line: (e.g. by date 2014-01-13 13:49) | |
grep "2014-01-13 13:49" original.log -n | more | |
# 2) get line number of last relevant log line: (e.g. by date 2014-01-13 16:36) | |
grep "2014-01-13 16:36" original.log -n | more | |
# 3) the total number of lines from the original log file: | |
wc -l original.log -n | |
# e.g. results of 1-3: |
# Add the below in the VirtualHost section (in apache2.conf of the sites-enabled/* file): | |
<Location /> | |
Deny from all | |
AuthUserFile /usr/local/etc/httpd/users | |
AuthName authorization | |
AuthType Basic | |
Satisfy Any | |
require valid-user | |
</Location> |
python -m SimpleHTTPServer |
In order to be able to download images from the internet,
add the below lines:
export http_proxy=http://proxy:8080
export https_proxy=http://proxy:8080
export no_proxy=*.lan