To delete a windows Service there is a practical and easy command.
Open a command prompt and digit the command:
sc delete ServiceName
ServiceName is the name you see when you open the property tab of a service in Windows.
NOTE
If "sc delete ServiceName" does not succeed it means you don't have enough privileges to execute this command. In this case open the command prompt as administrator and retry.
My Tips and Tricks for C#, C, C++, MatLAB, Java, LaTeX, Python and more!
Wednesday, June 22, 2016
Monday, June 13, 2016
Monday, June 6, 2016
Add a new line to a file (ANT)
How do you append lines in ANT?
Two basic things to know:
<echo message="First line. ${line.separator}" file="test_file.txt"/>
<echo message="Second line ! ${line.separator}" file="test_file.txt" append="true"/>
Notice the "append" attribute on the second echo!
That's all!
Source:
https://ant.apache.org/manual/Tasks/echo.html
Two basic things to know:
- echo task
- The ant property ${line.separator}
<echo message="First line. ${line.separator}" file="test_file.txt"/>
<echo message="Second line ! ${line.separator}" file="test_file.txt" append="true"/>
Notice the "append" attribute on the second echo!
That's all!
Source:
https://ant.apache.org/manual/Tasks/echo.html
Friday, May 27, 2016
Meet Plan9
An interesting look into Plan9. I hope the surviving projects will be successful someday.
A series on the Plan9 fundamentals:
http://pub.gajendra.net/2016/05/plan9part1
A series on the Plan9 fundamentals:
http://pub.gajendra.net/2016/05/plan9part1
Wednesday, May 25, 2016
R and Matlab
Looking for a comparison between R and Matlab I found this reference.
It is good and free so I like to recommend it!
http://www.math.umaine.edu/~hiebeler/comp/matlabR.html
It is good and free so I like to recommend it!
http://www.math.umaine.edu/~hiebeler/comp/matlabR.html
Friday, April 29, 2016
Bash: How to change recursively owner and group of files and dirs
Sometimes comes in hand to change recursively the owner and group for files in a directory. How to do this in bash?
With this command:
For example to change from root to foo of foogroup in the folder /var/lol use the command:
With this command:
find /starting/path -user "original_owner" -exec chown someuser:somegroup {} +
You can omit ":somegroup" if you don't want to change the group of the files/folderFor example to change from root to foo of foogroup in the folder /var/lol use the command:
find /var/lol -user "root" -exec chown foo:foogroup {} +
NOTE: You must be root to change the ownership of a root-owned file!
Source
superuser
Thursday, April 14, 2016
SSH and login prompt
If you log via SSH and you get a prompt showing only the bash version it means that .bashrc wasn't sourced. SSH sources .bash_profile not .bashrc.
To solve this problem, create/update .bash_profile with the following content :
Source
http://stackoverflow.com/
To solve this problem, create/update .bash_profile with the following content :
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
This is the way to go for docker too :)Source
http://stackoverflow.com/
Subscribe to:
Posts (Atom)