Multiple .gitignore in subfolders

Answer is: Yes, it is possible to have a .gitignore file in a subfolder. Documentation: When deciding whether to ignore a path, Git normally checks gitignore patterns from multiple sources, with the following order of precedence, from highest to lowest (within one level of precedence, the last matching pattern decides the outcome): Patterns read from … Read more

Multiple directories and/or subdirectories in IPython Notebook session?

The IPython documentation pages suggest that opening several different sessions of IPython notebook is the only way to interact with saved notebooks in different directories or subdirectories, but this is not explicitly confirmed anywhere. Yes, this is a current (temporary) limitation of the Notebook server. Multi-directory support is very high on the notebook todo list … Read more

Package name is different than the folder structure but still Java code compiles

The Java language specification doesn’t force files to be in a certain directory. It optionally allows the compiler to require that public classes are in files with the same name of the class, but I don’t think there’s anything similar for packages. Section 7.2.1 talks about possible storage options in a file system, but it … Read more

Use a subdirectory as root with htaccess in Apache 1.3

Finally got it, after a week of trying. RewriteRules really are voodoo… RewriteEngine On # Map http://www.example.com to /jekyll. RewriteRule ^$ /jekyll/ [L] # Map http://www.example.com/x to /jekyll/x unless there is a x in the web root. RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/jekyll/ RewriteRule ^(.*)$ /jekyll/$1 # Add trailing slash to directories … Read more

Javascript Redirect with Google Analytics

Note: _gaq.push allows pushing of functions onto the queue. The following code should redirect after 250 milliseconds (to allow time for the tracking pixel) after the _trackPageview: var _gaq = _gaq || []; _gaq.push([‘_setAccount’, ‘UA-1234567-8’]); _gaq.push([‘_trackPageview’]); _gaq.push(function() { setTimeout(function() { window.location = “https://market.android.com/developer?pub=Fractal%20Systems”; }, 250); }); (function() { var ga = document.createElement(‘script’); ga.type=”text/javascript”; ga.async = … Read more

Can I move the .git directory for a repo to it’s parent directory?

You can do what you are describing like this: Move the content of ABC to an ABC/ subdirectory, and fix the history so that it looks like it has always been there: $ cd /path/to/ABC $ git filter-branch –index-filter \ ‘git ls-files -s | sed “s-\t-&ABC/-” | GIT_INDEX_FILE=$GIT_INDEX_FILE.new \ git update-index –index-info && mv $GIT_INDEX_FILE.new … Read more

Android studio Where to install NDK file? (downloaded it in zip)

Yes, rename the extracted folder android-ndk-r13b(probably the exact name will be outdated someday soon) to ndk-bundle (you can put the NDK [and SDK for that matter] anywhere, and leave the name alone if you want {do not do this, I’m sure seen one case of hard-coded sub-path}), then, make the settings point to the location … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)