I'm tired of going through all the steps it takes (for me) to change the DocumentRoot in Apache. I'm trying to facilitate the process with the following Python script...
#!/usr/bin/python
import sys, re
if len(sys.argv) == 2:
f = open('/tmp/apachecdr', 'w')
f.write(open('/etc/apache2/httpd.conf').read())
f = open('/tmp/apachecdr',...
Hi all,
I've just installed Subversion on a Windows XP Pro box. Can I configure SVN in such a way that it always uses the same root directory to create a new repository with:
svnadmin create
?
So that if I do:
svnadmin create myrepository
it will automatically create a repository in for instance:
D:\data\svn\repositories\myrepos...
I have a link such as http://www.techcrunch.com/ and I would like to get just the techcrunch.com part of the link. How do I go about this in python?
...
Background: We are designing a physics app, that will do a lot of data analysis, but our focus is integrating physical electronic equipement.
Basically I would like to be able to call root (it's a big data analysis library from CERN written in C++) library written in C++ library from Java. Basically ability to use ROOT classes from Ja...
Hello,
I'm trying to redirect all subdirectories to the root of my website via .htaccess!
The code below works fine if I try to access a subdirectory ... but doesn't let me display the index page in the root because starts a loop of redirects!
RedirectMatch temp ^/.*$ http://localhost/
How can I solve?
Thanks!
EDIT1: Or is there ...
I have an array of objects which I want to serialize as XML. These objects are annotated to set XML node names but I was wondering how to set the name of the XML root node.
The code looks like this:
// create list of items
List<ListItem> list = new List<ListItem>();
list.Add(new ListItem("A1", new Location(1, 2)));
list.Add(new ListIte...
Is it possible to ask for a root pw without storing in in my script memory and to run some of os.* commands as root?
My script
scans some folders and files to check if it can do the job
makes some changes in /etc/...
creates a folder and files that should be owned by the user who ran the script
(1) can be done as a normal user. I ca...
Executive summary: how do I install a new root certificate into Java using Java code?
We have a desktop application which accesses various web services. Recently one of them switched their SSL certificate to one signed by Trustwave. While the Trustwave SSL certificates are accepted by regular internet browsers, Java does not seem to com...
I accidentally removed most of the privileges from my MySQL root user, including the ability to grant privileges. Is there some way I can restore this user to its original state?
...
Hi all
I have a script containing lots of commands that need root rights. Instead of running all these command with sudo inside the script I prefer to run the whole script with sudo. This is also more comfortable to put it in the sudoers file.
sudo ./script.sh
However, I'd like to show the progress with a kdialog progress bar, which ...
I'm writing a program in C that binds to a port < 1024. I'd like it to run at non-root privileges thereafter.
I know I need to call setuid(), but with what argument? UID's vary from system to system.
...
Hi
I am doing question 62 at project euler and came up with the following to test whether a number is cubic:
isInt x = x == fromInteger (round x)
isCube x= isInt $ x**(1/3)
But due to floating point error, it returns incorrect results:
*Main> isCube (384^3)
False
Is there a way to implement a more reliable cube test?
On a side-no...
This is my first iPhone application and it's based on a top-level tableview. Selections of rows either go to another tableview or to a view. The application runs OK on the simulator but when ported to my iPhone it fails with a EXC_BAD_ACCESS error. This happens while my splash screen is being displayed. NSLog indicates that the program p...
Is it possible to set a default folder to access instead of a file like "index.html".
What I'd like to to is make it so that when a person visits my site they get redirected to a folder within the root of the domain. I am using a blogging engine and I need it to show up as the homepage but I don't want to install it in the root because...
I have written a cgi-bin application in C that runs in a browser and allows the user to open an interactive shell and view & edit files on a Linux machine. It runs as the standard apache "www-data" user. I just added a login screen to it where the user types in their name and password (in a form) but I cannot authenticate the user using ...
Is it possible to use a sudo frontend (like gksudo) to elevate the privileges of the current process? I know I can do the following:
sudo cat /etc/passwd-
But I'm interested in doing this:
sudo-become-root # magic function/command
cat /etc/passwd-
I'm writing in Python. My usecase is that I have a program that runs as the user, b...
I have routes like this:
map.namespace 'prepayments', :path_prefix => '/:locale/prepayments' do |prepayment|
prepayment.root :controller => 'login', :namespace => 'prepayments'
...
end
map.redirect '/', :controller => 'prepayments/login' # this is not working
# I tried also
map.root :controller => 'prepayments/login'
What I wou...
Can anyone tell me, is it possible to use the ADB to pull and push a database from an app, without root privaliges on the phone?
For example, I know the location on my rooted magic and dream is:
/data/data/com.xxxx.xxxx/databases/xxxx
I know that you can use ADB without root, but when trying to use the shell - you can't view that loc...
I tried to use the standard iterative algorithm to compute nth roots.
For instance (111^123)^(1/123).
The standard algorithm computes high powers of the base (in this case 111^123) which takes a lot of time. The algorithm is given here http://en.wikipedia.org/wiki/Nth_root_algorithm
However, I noticed that the same thing using double ...
Hi all,
I'm building a CMS on a SaaS principle. I have my webserver (dynamic dedicated) up and running. It's all going like expected, but now I've come across my templating system, and later on simple things such as filehandling. Logically, each client has an own hostingaccount. All the hostingaccounts will be requesting to the masterda...