multiple projects with the same application folder in codeigniter - codeigniter

guys... I've this situation: I'm creating a system where will run multiple projects using the same application folder. Something like this:
project1 ==> newApplicationFolder
project2 ==> newApplicationFolder
(...)
projectN ==> newApplicationFolder
I need use this way, cause the projectN folders will have just the index and some configurations, like the sqlite database. And, that's the point: the projectN folders will be named by the user, so, i've not a static folder to indicate in the database.php.
Any idea to how I could to do?
It's possible extends the config file, or create a personalized config file inside the projectN folder?
Thanks

Related

serve_site() in blogdown un-deletes old files

I built a site using blogdown in Rstudio. I'm not sure if I am experiencing a bug or if this is expected, but it is kind of annoying, and I'm wondering if I can fix it.
When I use
serve_site()
All of the old file folders I deleted come back in my public folder.
My current set up is with the Lithium theme, and I make several test documents and folders to test the linking. When I make .Rmd files in the content folder in particular, it will create a folder with that name in the Public folder as well as that name_files.
After I delete the test folders and test file folders, the test file folders come back after I use the serve_site() function in Rstudio.
Example:
1) Add "Example.Rmd" to the content folder
2) Automatically an "Example" folder is added to the Public folder with the index.html
3) Automatically an "Example_files" folder is added to the Public folder with the related files
4) After testing I delete the Example.Rmd, Example Folder from the public folder, Example_files folder from Public
5) After using serve_site() in Rstudio, the "Example_files" folder comes back - I cannot delete it!
Thanks again
Look for *_files directories under the static/ directory (under your website's root directory) and delete them there.

How to deploy with some different directories on different servers using capistrano?

I need to deploy on different servers using capistrano with few different directories on each server.I have a main trunk branch, having 5 directories say web, log, legacy , common and config. Directory web have 40 directories say uploads,resources, project1 and project2, project3 etc.
Now I need to deploy server1 with whole code except project2,project3 and server2 with whole code except project1,project3 and server3 with all main directories and only 1 directory project3 from web directory.
I tried using copy_exclude parameter, it works but it can be tedious as well as error prone as it need to be monitored manually if anyone include any new directory in web as well as we miss to exclude any directory(being huge in number) for server3.
Please let me know if there is a clean and easy way to do so.
Thanks in Advance!!

Gitignore CodeIgniter

Before I put my very first (CodeIgniter) application on Github, I have a question about the CodeIgniter .gitignore file (see below). I do not have a development directory in my config directory. Can I just .gitignore */config/* instead? What is the importance of the development directory in the config directory?
*/config/development
*/logs/log-*.php
*/logs/!index.html
*/cache/*
*/cache/!index.html
Many people set up development and production folders in their config folders. Codeigniter will load the correct file from the correct folder depending on the environment you set in the main index.php
If you're creating a public repository on github copy the files with passwords and keys (your config.php and database.php are the only two that come standard with the framework I believe) to a new folder called development inside config, then remove the passwords and paths and things from the ones in the root folder. Leave the gitignore as is.
This way when you push to git you aren't pushing your personal private information to the project.

How to package JMeter with Jar Bundler on Mac

I'm unable to use "Jar Bundler" on mac to create JMeter.app from ApacheJMeter.jar, I was wondering if anyone else had previous experience with configuring this tool? The problem for me seems to be that the lib folder being searched is set to an incorrect base path:
org.apache.jmeter.NewDriver: JMeter home directory was detected as: /Users/username/Applications/JMeter.app/Contents/Resources
I looked here: http://developer.apple.com/library/mac/#documentation/Java/Reference/Java_InfoplistRef/Articles/JavaDictionaryInfo.plistKeys.html
But no matter how I configured any of the said properties, the logs looked the same.
The real trick is making sure the bin and lib folders can be found. The only jar file you will need to add is ApacheJMeter.jar. Look in the bin/jmeter script for additional properties to put into the properties tab of the Jar Bundler. The java arguments in the bin/jmeter script should be copied into the VM Options field. Check Set Working Directory to Inside Application Package. Now create application. Open up the .app folder that was just created and copy the bin and lib folders into the Resources directory. Done.

Maven Assembly: Setting up external svn for in-program-use

I have a very specific question. The project I am on is a maven3 driven multi-module Project. The Project uses the SVN-Api to synchronize data from a repository and process it. More specifically:
A Manager, upon recieving an update call, will contact a remote svn repository and sync the files to the harddrive, where it will afterwards process them.
I want to create an appropriate folder Structure, with the assembly plugin. When I run a package command, ideally the output in the target folder would be
target
- data <- this is the base folder for the external repository
--- .svn <-- repository-information
--- group1 <-- subfolders on repository
--- group2
--- group3
- program.jar <-- contains java classes, executable
- config.xml <--- config file, editable by user
- other miscalleanous files
So frankly, this poses a number of problems and on top of this, I don't have too much experience with the assembly plugin. What I am not quite getting is how I am able to differentiate between files that should be put into the jar and files that should be kept outside the jar.
I have read about the assembly descriptors, I have however only seen examples that either include or exclude files, none that provide information about the relative positions the files should later have in the target folder.
Thanks for your time.
Regards,
Keno
So after some research I decided to go the following (simple) way:
At startup, The program fetches the location it's jar file is at, then checks for an resource folder outside the char. If none is found, it checks out the base directory of the svn server and starts crunching numbers. This way didn't require any fiddeling with the maven pom, and it works for testing as well.

Resources