Tuesday, December 25, 2012
Dvorak on stock Android keyboard
Sunday, December 23, 2012
Google Docs Viewer
https://docs.google.com/viewer
Thursday, December 20, 2012
x86 Emulator on Android
Limbo PC Emulator (link) is based on QEMU. It can load .iso images, for example Linux Live CDs, and use disk images from other emulators.
More info here.
Hacker's Keyboard (link) is recommended when working with emulator, as well as ConnectBot, an SSH client for Android.
Issue with Maps API on Cyanogenmod 10.1
Cyanogenmod 10.1 is out for Samsung Galaxy S2 (i9100), with Android 4.2.1. There is also new gapps package with Google libraries.
However, after installing these, all the apps depending on Google Maps API are failing to start or install.
The message that pops up during installation is "Error: Missing shared library."
Looking at logcat, this is the full error message: "E/PackageManager( 2208): Package com.google.android.apps.unveil requires unavailable shared library com.google.android.maps; failing!"
I fixed permissions on the files below:
/system/etc/permissions/com.google.android.maps.xml
/system/framework/com.google.android.maps.jar
Monday, December 17, 2012
KeePass Plugins
KeePassHttp & ChromeIPass
Integrate KeePass into Chrome.Requires KeePassHttp plugin (https://github.com/pfn/keepasshttp/).
For integration using Mono, go to https://github.com/pfn/keepasshttp/tree/master/KeePassHttp and download KeePassHttp.dll and Newtonsoft.Json.dll. Put these files into Keepass directory.
WinKee
Caches and encrypts your KeePass file credentials with your Windows account credentials to allow quicker database opening.WebAutoType
Sunday, December 16, 2012
Prevent Monitor Sleep in Gnome/Cinnamon
As I started using Cinnamon as a window manager, Caffeine shell extension for Gnome is not available anymore. This was a very convenient quick option to prevent screen going off in the middle of watching a movie. The root cause is that the option for screen going to sleep cannot exceed 1 hour in Gnome settings.
However, there are ways to modify this. I just wonder why something as simple as this is not already a part of standard system settings.
In order to prevent screen going off at all, these are the settings that need to be modified. This can be done either through command line (thus a perfect candidate for scripting, which is my current preferred option) or through a GUI, a program called dconf-editor.
org.gnome.settings-daemon.plugins.power sleep-display-ac org.gnome.settings-daemon.plugins.power sleep-display-battery org.gnome.desktop.session idle-delay
To display the value of these settings in a shell (command line), use "gsettings" with parameter "get" and then the name of the setting. For example:
gsettings get org.gnome.settings-daemon.plugins.power sleep-display-ac
To modify the value use "set" and a value at the end.
gsettings set org.gnome.settings-daemon.plugins.power sleep-display-ac
Source: Disable GNOME3′s Habbit Of Turning Off The Display After Some Time (link)
Saturday, December 15, 2012
Disabling Group Policy on Windows 7
For editing the registry the administrative credentials are required.
Disable background refresh of Group Policy (link),
Disable Group Policy Service on Windows Vista/7 (link)
Adobe Reader on Linux
http://blogs.adobe.com/acroread/2008/02/14/adobe_reader_now_available_via/
Friday, December 14, 2012
Wood Theme for Cinnamon
http://cinnamon-spices.linuxmint.com/themes/view/24
Sublime Text 2 Tips & Keyboard Shortcuts
- Multiple selection: hold Ctrl and select. With multiple selection, when you type, the text will be written at all selected locations.
- Multi-selection with keyboard-only: Ctrl+Alt+cursor keys.
- Un/Comment current line(s): Ctrl + /
- Move code lines up/down: Ctrl+Shift+Up (or Down)
JavaScript Performance Tips & Tricks
Instead of writing
eval(strCode)
use
(new Function(strCode))()
http://moduscreate.com/javascript-performance-tips-tricks/
Integration Testing with LocalDb
Some general guidelines would be:
- Add a service-based database to a project;
- Set the DbContext's connection string to use LocalDb engine with this database;
- Populate the database prior to use (static data, test-specific data);
- Run tests.
Add a Database to a Project
In Visual Studio, right-click on a (test) project and select Add -> New Item… -> Visual C# Items -> Data -> Service-based Database. The assumption is that we already have a working code, using a real database. Hence there is an existing context. So, during the creation of the database file we will not generate any db-access code automatically (press Cancel in the wizard) or we will delete the auto-generated code after it is added to the project.By default, the database file is set to "Copy always" to output directory so no action required there. This means that it will be in our output directory when the project is built, and we can note that this is the location we will use in the connection string next.
Set Connection String
References:
Developer goodness - LocalDb (link)Using SQL Server 2012 LocalDb in VS11 and VS2010 for testing (link)
IIS 7 Not Serving Images
Fortunately, the solution was simple. Serve Static Content option was not selected in Windows Features -> IIS.
More instructions - link.
Thursday, December 13, 2012
Cinnamon
While I like Gnome 3 interface, there is a nasty glitch in a combination of Gnome 3 + NVidia drivers + VMWare Workstation, where Gnome session will stop responding. One can still switch to another console and kill the session but that can take down any running Virtual Machine or other programs that were active in the unresponsive session.
So, as a suggestion from VMWare Community, I found Cinnamon and am giving it a try. So far the impression is positive but I'm missing my Caffeine extension that prevents the system from locking down in the middle of a movie.
More on Cinnamon: http://cinnamon.linuxmint.com/
Dropbox Installation Aborted
The list of installed programs showed Dropbox and the removal worked but any subsequent installation would again fail.
These are the steps that I tried, in order to be able to reinstall:
- Uninstall Dropbox from Programs and Features
- Remove Dropbox directory from %APPDATA%. To do this, open Windows Explorer and type "%APPDATA%" into the address bar (without quotes). If there are any issues (with the shell extension, for example), use Unlocker to get rid of it.
- Remove "HKEY_CURRENT_USER\Software\Dropbox\" with RegEdit. See this help article.
- While in RegEdit, delete all keys containing "Dropbox". These are mostly related to ShellExtension.
- Clean-up registry with CCleaner, Wise Registry Cleaner (link), and Eusing Registry Cleaner.
- Remove other Dropbox entries with Autoruns. (Shell extension is in "HKLM\Software\Classes\*\ShellEx\ContextMenuHandlers"; "HKCU\Software\Classes\Directory\ShellEx\ContextMenuHandlers", "HKCU\Software\Classes\Directory\Background\ShellEx\ContextMenuHandlers", "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers")
- Unlink your computer from Dropbox (link).
In the end, it turns out the issue was caused by antivirus policy which blacklists dropbox.exe. Probably the policy was not updated during the first installation. Fortunately, Dropbox will work even if .exe file is renamed.
Unlocker
For 64-bit systems there is a separate 64-bit version.
Since there are a lot of download links on the Internet, I always miss the original one that also has a 64-bit version. Here it is for reference:
http://www.emptyloop.com/unlocker/
Monday, December 10, 2012
.cmd syntax coloring for Sublime Text 2
Add .cmd file syntax support to Sublime Text 2 by appending
to the file extension array at the bottom of
c:\Users\
Sunday, December 09, 2012
Mediaserver process on Android
There are lots of complaints out there and no straightforward way to solve the problem. I am trying the following:
Debugging Gnome Shell Extensions
To start Looking Glass, press Alt+F2 and type "lg".
After updating an extension code, reload the Gnome Shell with Alt+F2 and typing "r".
Source: http://stackoverflow.com/questions/8425616/how-to-debug-gnome-shell-extensions-is-there-any-tool-for-that
Saturday, December 08, 2012
Gnome 3.6 Online Accounts and Google 2-Step Authentication
Open Seahorse, find your passwords for “GOA”
Create an application-specific password for your Google account in the web browser.
In Seahorse, open the entry and display the password. It will be very long, find the following section: 'password': <'your_password'>.
Replace your_password with your application-specific password you’ve generated.
Source: http://kparal.wordpress.com/2012/12/03/gnome-3-6-gnome-online-accounts-and-google-two-factor-authentication/
Wednesday, December 05, 2012
SQLite Browser standalone
http://sourceforge.net/projects/sqlitebrowser/
Tuesday, December 04, 2012
Edit Start Menu in Windows 7
For graphical details, see this link.
Monday, December 03, 2012
Computer Ergonomics
Looking for an alternative to EyeDefender on Linux, I found this great program. It is free (Open Source) and quite configurable. I love how it is implemented - the breaks, the notifications, timers. The default values might require some tweaking, depending on your situation.
The default settings from EyeDefender are 2-minute break every 45 minutes. The settings I'm using are taken from the following link in a good article on ergonomic set up for the workplace - http://lifehacker.com/5755870/how-to-ergonomically-optimize-your-workspace
and they are:
Microbreak every 15 minutes for 30 seconds;
Rest break every 45 minutes for 3 minutes;
and a Daily limit of 8 hours.
WorkRave includes exercises that one can trigger manually. These automatically pop up during rest break. I really like the program so far.
Some related articles with comments on break time and frequency:
http://cybernetnews.com/how-to-prevent-eye-strain-and-rsi/
http://www.working-well.org/workrave.html
Customize Visual Studio 2012
Set-ItemProperty -Path HKCU:\Software\Microsoft\VisualStudio\11.0\General -Name SuppressUppercaseConversion -Type DWord -Value 1
Source: link.
Set up tab size and whether to use tab or space. Tools -> Options -> Text Editor -> All Languages -> Tabs. Set tab size to 4, indent size 4, insert spaces.
Source: link.
Colors. Use Color Theme Editor to set the VS theme. (link)
Friday, November 30, 2012
OSMAnd Default vs Development
OsmAnd versions at the nightly download page are as follows:
- default = free version at Market
- development = OsmAnd+ version at Market
Update: The non-default version is now called -nightly.
Tuesday, November 27, 2012
Adding dependent files in VS 2012
As per answers on Stack Overflow (link), VSCommands for Visual Studio 2012 (link) enables managing dependent files through GUI rather than having to manually edit the project file (.csproj) and reload the project in IDE.
The way it works with VSCommands is to select .coffee and .js files, right-click, and select "Group Items" option, then select the parent item. Neat.
Tuesday, November 20, 2012
Managing services in Linux
A nice GUI tool for managing services is called system-config-services and is installed by the package with the same name.
Tuesday, November 13, 2012
Monday, November 12, 2012
Google Earth 7 on Fedora 18
Using
rpm -U --forcesolves this problem. Then, if you get "/lib/ld-lsb.so.3: bad ELF interpreter", this means that 32-bit libraries are missing. Install them with
yum install redhat-lsb.i686 redhat-lsb-graphics.i686 redhat-lsb-printing.i686However, after this Google Earth crashes. The issue has been reported here.
Edit: Tried with google-earth-stable-7.0.2.8415-0.x86_64. It still clashes with the filesystem package. Forcing installation succeeds but then again Google Earth crashes on start. The reported issue has been updated with the error log.
Sunday, November 11, 2012
Hibernate in Fedora 18
sudo /bin/sh -c 'echo disk > /sys/power/state'
Source: https://ask.fedoraproject.org/question/2181/the-final-battle-between-gnome-3-and-hibernating
As if that is not enough, there is an even easier way:
pm-hibernate
This utility is a part of pm-utils package.
Wednesday, November 07, 2012
Mobile Development with HTML5
Here I will list some resources that can assist in mobile development with HTML5 and related technologies.
- PhoneGap (link) - open source framework that supports 7 mobile platforms
- Building Android Apps with HTML, CSS, and JavaScript, book (link)
To set up PhoneGap, you need to set up the following dependencies first:
- Java SDK
- Ant
- Android SDK
To see more about setting JAVA_HOME, check this article by Oracle (link).
Data Access
Monday, November 05, 2012
Setting up a Fedora 18 system
Kernel Panic with VMWare Workstation 9
Other occurrences: here, and here.
Threads on VMWare Community: 2103048, 400616.
Patch, vmware 9, kernel 3.5: here
Another issue that appears occasionally is "can not open /dev/vmmon"
As per this suggestion, the solution is to run "sudo service vmware start"
Setting up portable Sublime Text 2
Sublime Text 2 (link)
Dev Build (link)
Nightly Builds (link)
==================================
Data directory
See Basic Concepts (link).Data directory in portable version contains user data which is located in
Windows: %APPDATA%\Sublime Text 2
Linux: ~/.config/sublime-text-2
when using installed version.
=====================================
Sublime Package Control
Package Control homepage (link).I had issues loading the repository via SSL. In that case edit Package Control.sublime-settings, in Data\Packages\Package Control\, and use http instead of https.
=====================================
CoffeeScript
Instructions 1 (link), instructions 2 (link).Instead of
In the file User/CoffeeScript.build-settings, Path parameter is pointing to the location of the coffee executable.
Build on Save (link)
Add "coffee" to the file types (Preferences -> Package Settings -> SublimeOnSaveBuild -> Settings-User).
=====================================
TFS
Sublime TFS (link)Team Foundation Server Power Tools December 2011 (link)
Sunday, November 04, 2012
Mounting ISO to Wine prefix with q4wine
One of the things often required for installation of software is mounting ISO files as CD-ROMs to a Wine prefix. The way to do this in q4wine is the following:
When creating a prefix (or editing once it has been created), in the Quick Mount section on the General tab, set the mount point directory. The best is if this is within the prefix directory itself. For example, if the prefix is in "/home/user/wine/x86", the mount point would be "/home/user/wine/x86/cdrom". Create the mount point directory if it does not exist. Use full path directory names, not ~.
In the same section, set the Device (windows drive). The default is the next available letter, which is D:.
Once this is set up, install "fuseiso" package. This turned out to be the easiest way of mounting ISO files as an ordinary user. No root access needed, not even sudo.
Set q4wine to use fuseISO by going to File -> Options -> Quick Mount. Select FuseISO as a Quick Mount profile. Leave the commands at the default settings.
Then go to Tools -> Disc Image Manager and add the .iso file to the list of known images. The images from here will be available in the Mount menu.
After all this is set up, right-click on the prefix, select Mount ISO option, and select the .iso file added to the Disc Image Manager. It will become available to the selected Wine prefix. Then you can simply run any program from that Windows drive, as set in the prefix settings.
Friday, November 02, 2012
QUnit: Testing JavaScript
Below are additional useful resources.
Monday, October 29, 2012
designMode and window events in HTML5
document.designMode = "On";in your document code, the timers, before-unload, and similar events will not fire in Firefox.
One way out of that is not to use designMode and stick to contenteditable attributes only.
This is a part of the spec. See here.
Even more important issue is that, when the browsers implement the HTML5 specification completely, designMode should block the scripts. As the above specification states:
Enabling designMode causes scripts in general to be disabled and the document to become editable.and also
Thus, for instance, enabling designMode will disable any event handler attributes, event listeners, timeouts, etc, that were set by scripts in the document.
Saturday, October 27, 2012
Skype 4 on Fedora 18
sudo yum install alsa-plugins-pulseaudio.i686
This will install all the required dependencies to remove "Problem with Audio Capture". Other than that, the installation is pretty good in that it installs all the other dependency libraries. No need to install them separately any more.
Monday, October 22, 2012
Cryptography with JavaScript
Crypto Libraries
Password Managers
Steganography in Javascript
Steganography is the art of hiding the message in a way that is not suspected. Below there are a few examples of steganography with images.Practical Steps
Additional Links
- Cryptography with Javascript (link)
Sunday, October 21, 2012
Importing CAcert Client Certificate into Chrome
The way I made it work in Chrome is by using Firefox. The process works fine in Firefox. Firefox has its own certificate store so, after importing the certificate, go to Firefox Settings and export the certificate, including the private key. Then, in Chrome Settings, go to Manage Certificates and click Import button. Select the previously exported certificate and you're good to go.
Then go to https://secure.cacert.org/index.php?id=4 to test logging in with the certificate.
As certificates build upon public-key infrastructure (PKI), I assume this should become the standard way for authentication. The important push ahead comes from CAcert (cacert.org), the organization that offers free certificates.
Tuesday, October 16, 2012
Minimalist Web Server
Currently, my preferred option is using Node.js with node-static (link).
See the code below or click here to see it on Github.Gist.
This requires node-static to be installed. The most convenient way is to add it as a dependency to the package.json, like this:
and run "npm install".
Then, simply add index.html or other static files and the server is up and running.
Wednesday, September 26, 2012
Console system info for Linux
- iftop - monitor network traffic
- htop - monitor CPU and memory usage, processes
Tuesday, September 25, 2012
Problems with Visual Studio 11 (2012) and ASP.NET MVC 3
On a system with Visual Studio 2010 and all versions of ASP.NET MVC, I installed Visual Studio 2012. From the start it could not open an existing solution with MVC 3 project inside.
The steps to the solution:
- Download ASP.NET MVC Tools Update for Visual Studio 11 (link)
- Have your VS 2012 installation disc ready
Thursday, September 20, 2012
NSubstitute - simple mocking framework
//Create:var calculator = Substitute.For();
//Set a return value:calculator.Add(1,2).Returns(3);
Assert.AreEqual(3, calculator.Add(1, 2));
//Check received calls:calculator.Received().Add(1, Arg.Any());calculator.DidNotReceive().Add(2, 2); //Raise eventscalculator.PoweringUp += Raise.Event();
Monday, September 17, 2012
Desktop System Info on Windows
Currently I'm using Rainlendar and Networx on my desktop. Still missing some indicators, like processor, RAM, and disk queue and/or throughput. So, here are some tools and findings:
- DesktopInfo: Nice. Integrates with desktop. Simple and easy. Missing network throughput in bytes/kilobytes.
- Rainmeter: Great indicators. Skinnable and customizable. Can be displayed on desktop so it is not hidden with Win+D key combination. Seems a bit unresponsive at times. Has issues displaying the correct time for different time zones than local.
Check the awesome skins here. - BGInfo: displays the system information on desktop.
Friday, September 14, 2012
Wednesday, September 12, 2012
HDMI Sound on Fedora 17
With the latest NVidia drivers the display on HDMI output is recognized properly and works beautifully. However, the sound is still a no-go. This text is here to store my findings in making the sound be heard on the TV speakers.
Some useful links to start with:
Tuesday, September 11, 2012
Clipperz - JavaScript password manager
Clipperz is a free and anonymous online password manager. Local encryption within the browser guarantees that no one except you can read your data. Nothing to install.
Thursday, September 06, 2012
Adding 'node' link on Linux
ln -s /bin/nodejs /bin/node
Wednesday, September 05, 2012
Useful Node.js Packages
- express
- connect
- xmlrpc
- forever, and forever-monitor (keeps the app running)
- node-inspector (enables debugging with Chrome debugger)
- supervisor (restarts node when .js files change, also keeps the app running)
- nodev (link) - links inspector and supervisor
npm tips
Install a package:
npm install
Install a package globally:
npm install -g
List all installed packages and their version
npm ls
Display current package version:
npm info
Install all dependencies (from package.json):
npm install
Installing Forever on Fedora 17 Linux
npm install forever
npm install forever-monitor
However, more is required on Fedora 17:
yum install nodejs-waf
yum install waf
yum install nodejs-devel
Only now 'forever' package installation will go through.
I'm still getting errors installing forever-monitor.
Running 'forever' also results in an error:
module.js:337 throw new Error("Cannot find module '" + request + "'"); ^Error: Cannot find module './daemon.v0.6.18' at Function._resolveFilename (module.js:337:11) at Function._load (module.js:279:25) at Module.require (module.js:359:17) at require (module.js:375:17) at Object.(/usr/lib/nodejs/forever/node_modules/daemon/lib/daemon.js:12:11) at Module._compile (module.js:446:26) at Object..js (module.js:464:10) at Module.load (module.js:353:31) at Function._load (module.js:311:12) at Module.require (module.js:359:17)
Tuesday, September 04, 2012
XMLRPC for JavaScript
Starting from a question on Stack Overflow (link).
List of libraries:
Json XML RPC, http://code.google.com/p/json-xml-rpc/
Not maintained any longer.- http://kuriositaet.de/javascript/jsxmlrpc.html
- http://kuriositaet.de/javascript/xmlrpc.html
- http://sourceforge.net/projects/jsxmlrpc/
- http://www.zentus.com/js/xmlrpc.js.html
- http://www.scottandrew.com/xml-rpc/
- http://phpxmlrpc.sourceforge.net/jsxmlrpc/
Last news posted on 5th of September, 2009. - http://www.vcdn.org/Public/XMLRPC/
- http://mimic-xmlrpc.sourceforge.net/
A few Git tips
git pullUpdate local version to master branch
git checkout masterThe process when updating your fork of someone else's repository is described here. Basically, fetch changes from the original repository (upstream):
git fetch upstreamMerge the changes into local master branch:
git merge upstream/masterPush the changes to your remote repository (on GitHub). Easiest way on Windows is to use GitHub application.
Remove Git Explorer Extensions (Cheetah)
C:\Program Files (x86)\Git\git-cheetah>regsvr32 -s -u git_shell_ext64.dll
You don't have to delete the dll. As soon as it is unregistered the entries will be gone from Windows Explorer.
Friday, August 31, 2012
Dropbox Public Folder
Since now Dropbox also offers 2-step authentication with Google Authenticator, I strongly suggest you use it to protect your online files. But, since this also complicates access when you don't have your access devices, Public folder can be used for quick access to the files you might need on the go. Use at your own risk, of course.
The link to my public folder is here.
Thursday, August 23, 2012
RDP for Linux
- yum install xrdp
- xrdp
- xrdp-sesman
systemctl enable xrdp.serviceYou can confirm that the service has been created by running 'Services' from the Applications menu.
Set the RDP client to use 24-bit color and it will happily connect from Windows to your Linux server!
To set a custom resolution after you connect, go to System Settings -> Display and set any desktop resolution you like.
I also tend to use Dvorak keyboard layout. Simply changing the keyboard layout to English(Dvorak) won't work unless it is also set with "setxkbmap dvorak".
Automatic Login with Putty
On the Client:
- generate a new key with PuttyGen
- save the private key into a .ppk file
- copy the public key string from the text box at the top and paste into authorized_keys file on the server
- In Putty Session, go to Connection->SSH->Auth and add the private key for authentication.
- Run pageant and add the key file with the pass phrase to it.
On the Server:
- in your ~/.ssh/ directory create authorized_keys file
- chmod 600 authorized_keys
- make sure that, in sshd_config, only authorized_keys file is used to check for allowed keys
Sources:
Putty public keys (link)
ssh authorized_keys (link)
How to fix "Server refused our key"; comments (link)
Store passwords in Putty (link)
Enabling SSH Server on Fedora 17
SSHD package is installed by default. You need to start the daemon/service. With elevated privileges do the following:
To enable the service
$ systemctl enable sshd.service
Start service
$ systemctl start sshd.service
Now you can test sshd service by logging in from the local terminal (not remote one, yet) -> ssh localhost, or ssh
After this is done, allow access to sshd through firewall.
$ system-config-firewall
Make sure port 22 is allowed for access. This was done by default in my case. Then, I had to add a new interface in the Trusted Interfaces. The mask I added was "em+" for all em devices. Then enable this interface.
After this, I could connect to port 22 from a remote Windows box.
Sources:
SSHD service (link)
Firewall Tip (link)
Friday, August 03, 2012
Merge/diff tool settings for TFS integration
Beyond Compare
- Instructions (link)
CodeCompare
- Instructions (link)
Tuesday, July 24, 2012
ClickOnce: The directory name is invalid
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of https://qat.unvienna.org/APGUI-Global/APGAssignmentPro.application?ticket=87E653CC3B6235E1223144B171B4D17742B2DE7C2FD431ED56F2113BB77C694906107D95973A7731FB307B1C967CA8C71043FC3E0FD3EC191B53E9D2D07E4ACBB1D5EDE5ADF266215710F392A2889362AF3A6326DD63F52659923174E8E774FE793C69DFCEF57506C0D62A9E8011EE48B9506616&Location=Vienna resulted in exception. Following failure messages were detected:
+ The directory name is invalid. (Exception from HRESULT: 0x8007010B)
Reference: Missing Local Files (link)
RIOT - Free Image Optimizer
link
Friday, July 13, 2012
Installing Business Intelligence Studio - Reporting Services
Here is a brief on how to work (develop) Reporting Services based reports in an environment with Team Foundation Server 2010 used for source control and SQL Server 2008 R2 used as a database server / Reporting Services server.
Instructions on installing components are here.
Install
- Visual Studio 2008 Team Explorer,
- Visual Studio 2008 Service Pack 1,
- Visual Studio Team System 2008 Service Pack 1 Forward Compatibility Update for Team Foundation Server 2010
and connect to TFS server.
Friday, July 06, 2012
Period in the MVC application URL results in Error 404
We've just had a case where a parameter to an MVC method was resulting in 404 Error because it contained a period (.) in the name. The application was running in IIS 6, .Net Framework 4, MVC 4.
The solution was to create a wildcard application map for aspnet_isapi.dll that does not verify that the file exists, as described in the following link.
LLBLGen Visualizers in VS 2010
- SD.LLBLGen.Pro.DebugVisualizers2010.dll,
- SD.LLBLGen.Pro.DQE.SqlServer.NET20.dll, and
- SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll
This enables previewing the Predicate Expressions, Relations collections, Entity collections, Sort Expressions, Prefetch Paths and what not.
More details (link).
Thursday, June 21, 2012
TortoiseHg (Mercurial) and Passwords
Mercurial Keyring is an extension that securely handles this. Additional configuration may be needed, as per this article (link) but changes in TortoiseHg and the extension itself may make these obsolete.
Wednesday, June 20, 2012
Changing home directory for IIS Express
If you want to bring your sites along when switching machines, or sync them via some cloud service, you can change the home directory for IIS Express. Home directory is where all the configuration for web sites is stored.
Changing the User Home Directory
IIS 8.0 Express supports changing the user's home directory, which is mapped to the %IIS_USER_HOME% variable in configuration. By default this path is located at %UserProfile%\Documents\IISExpress, but users can change this by setting a CustomUserHome registry property in HKCU\Software\Microsoft\IISExpress, or by specifying the "/userhome" parameter when launching iisexpress.exe.
From ReadMe (link).
Developer goodness - LocalDb
"LocalDB is created specifically for developers. It is very easy to install and requires no management, yet it offers the same T-SQL language, programming surface and client-side providers as the regular SQL Server Express. In effect the developers that target SQL Server no longer have to install and manage a full instance of SQL Server Express on their laptops and other development machines. Moreover, if the simplicity (and limitations) of LocalDB fit the needs of the target application environment, developers can continue using it in production, as LocalDB makes a pretty good embedded database too."Currently available for download from here.
A few things to note, though. LocalDb can be installed only on OSes above Windows 2000. It requires SQL Native Client which has to be installed separately. It can only be managed with SQL 2012 management tools which have to be installed separately. It supports only local connections through Named Pipes. The maximum database size is 10 GB.
All this seems good enough for development, or even minimalistic production setups, and is offset with the ease of deployment.
The connection string to use with LocalDb is "Data Source=(localdb)\v11.0;Integrated Security=true".
A few introductory articles:
Tuesday, June 19, 2012
Adding ASP.Net MVC 4 to Web Forms Project
This is probably not what you think. But, since I don't know what you think and that is irrelevant at this point, we can get down to business.
I've just added MVC 4 to an existing ASP.Net Web Forms project. There were a few quirks, especially with all the advice out there in regards to versions of MVC. So, here are some notes I wrote down during the process that can come in handy when performing the same exercise again.
Adding MVC 4
A great start is this article here. However, this relates to older version of MVC so some adjustments are necessary. The section that relates to adding items to the web.config, in particular. Basically, all the 3.5.0.0 versions need to be replaced with 4.0.0.0. The modified contents are here.Adding Razor
Friday, June 08, 2012
AutoFac, IoC Container for .Net
Monday, June 04, 2012
Installing latest Redmine on Windows
Ruby is required for Redmine.
Ruby installer adds the following to the PATH:
C:\Ruby187\bin;
Steps
- gem install bundle
- gem install webrick
- gem install rails
json package
json native package requires installation of DevKit.
http://github.com/oneclick/rubyinstaller/wiki/Development-Kit
cd <devkit_install_dir>
ruby dk.rb init
ruby dk.rb review
ruby dk.rb install
rmagick can't be installed on Windows. Use:
bundle install --without development test rmagick
Configuring Redmine
rake generate_secret_token
Running
ruby script/rails server webrick -e production
Thursday, May 31, 2012
Type umlauts on Dvorak keyboard in Linux
Basically, in the keyboard layout settings, set the Compose key. In Fedora 18 Gnome 3.6 this is in Keyboard -> Shortcuts -> Typing.
I use Right Alt for this. And then type key combinations to get umlauts:
- ä = compose, ", a
- ö = compose, ", o
- ü = compose, ", u
- ß = compose, s, s
Source Article.
Windows Server Update Services
Here are some resources for setting up a Windows Server Update Services (link).
Windows Server Update Services (WSUS) enables information technology administrators to deploy the latest Microsoft product updates to computers that are running the Windows operating system. By using WSUS, administrators can fully manage the distribution of updates that are released through Microsoft Update to computers in their network.
Download WSUS 3.0 SP2 (link). WSUS Installation Guide (link).
If you get a message indicating that "IIS role or additional IIS role services must be installed", it is probably because your Windows Server IIS is missing IIS 6 MetaBase Compability role service.
After installation, I gave Read permissions on "c:\wsus" directory for Everyone so that any computer on the network could access the updates.
Clients
Configure client updates (link). Configure clients to use WSUS as the primary source of updates (link). Setting the clients that are not in the same domain is done by editing registry (link).
Create the key HKEYLOCALMACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate\AU and add a DWORD value "UseWUServer" and set its value to 1.
Then in HKEYLOCALMACHINE\Software\Policies\Microsoft\Windows\WindowsUpdate add keys WUServer and WUStatusServer, type String (Reg_SZ), and set them to the same value. That being the HTTP(S) address of your update server.
These settings are available as a .reg file on my Dropbox (link). You should adjust the URL to point to your WSUS server installation.
After client workstation restart, it automatically uses the WSUS server for Windows Update. The first time it checks for updates it will install a different version of Windows Update components. After that it will allow checking against a WSUS server as well as against Microsoft online update.
Administration
As an Administrator, you may want to clean the database ocassionally. This is done by removing superseeded updates.
A convenient way to download updates is to look at Needed updates. These are reported as needed by the clients.
The updates will download after they are approved (by default). This option is adjustable.
Enabling Java applets in Chrome on Fedora
To enable running Java applets in Google Chrome under 64-bit Linux (Fedora 17 x86_64) the following steps should get you going.
Install Java Runtime Environment. The version 1.7.0_04 uses the directories specified below.
# mkdir /opt/google/chrome/plugins
# cd /opt/google/chrome/plugins
and then either
# ln -s /usr/java/default/lib/i386/libnpjp2.so
for 32-bit version (i586), or
# ln -s /usr/java/default/lib/amd64/libnpjp2.so
for 64-bit version (x64) of JRE.
After this, go here to test whether Java applet support is successfully installed in Chrome.
Tuesday, May 29, 2012
Setting the default file handler in Gnome
Changing the default image viewer in Nautilus (default file manager in Gnome 3.4) is quite easy. Right-click on an image, select Properties, then go to Open With tab. Either select a different image viewer from the list there and click 'Set as default' or select a different handler by clicking 'Show other applications' button and searching for the desired application.
This process works if you want to change the default file handlers for any file type.
More Node Plugins
The Node Toolbox (link) contains categorized links to plugins for Node.js with descriptions. Quite a useful site for a javascript developer.
Saturday, May 26, 2012
Changing GDM background
The Beefy Miracle wallpaper is not very pleasing to the eye so I looked into changing GDM background on Fedora 17 Linux. In order to accomplish this feat, we can use gdm3setup.
To get gdm3setup, clone its git repository:
git clone https://github.com/Nano77/gdm3setup.git
Then run install.sh script as root to install. It will install a shortcut (.desktop file) so the application is accessible from the Applications list as GDM3 Settings.
Apart from changing the wallpaper, it offers a few more options for customization of both GDM and Gnome Shell, like cursor theme, GTK theme, logo, etc.
Source: link
Friday, May 25, 2012
Useful Shortcuts in Nautilus
I'm getting used to Nautilus as a default file manager in Gnome. While at first it seemed inferior to Dolphin from KDE, after discovering plugins and shortcuts to different features, I find it quite convenient and capable. It has all the features I'm used to with Dolphin (or Windows Explorer for that matter).
Some of these features would be WebDAV support (mentioned earlier), integration with desktop search, being supported by Beyond Compare, terminal integration, and so on.
Here I will list some of the useful plugin packages and shortcuts when using Nautilus.
Plugins
- File Roller
- Gnome Exe Thumbnailer
- Nautilus Actions
- Nautilus Dropbox
- Nautilus Extensions
- Nautilus Open Terminal
- Nautilus SendTo
- Nautilus Terminal
- Seahorse Nautilus
- Sushi
- TortoiseHg Nautilus
- Tracker Nautilus Plugin
Keyboard Shortcuts
- F3 = Extra pane
- F4 = Terminal window (Nautilus Terminal)
- F6 = Switch panels
- F9 = toggle sidebar
- Ctrl+1..3 = view (Icons, Compact, List)
- Ctrl+T = New tab
- Ctrl+PgUp (or PgDn) = browse tabs
- Alt+1..n = browse tabs by number
- Ctrl+F = search
At first I was not sure what the extra pane was used for. I prefered using tabs. Panel, however, is a completely new panel view that can have its own tabs. This allows a setup pretty similar to Total Commander (and the likes). Nautilus supports Copy and Move to the Other Panel commands, which is very convenient. This is one of the things I *loved* in Total Commander and was missing in Windows Explorer.
Vice, Commodore 64 Emulator on Linux
A night of fun and nostalgia - playing with Vice, Commodore emulator on Linux. Available as a package simply named "vice" in official Fedora repository, 5.8 MB in size, is a relatively quick download.
Some useful settings on modern screens would be to increase the size of the display by using Settings -> Vic-II Settings -> Double Size; or use Alt+D to turn on Full Screen mode altogether. To enable Full Screen mode, I had to switch Settings -> VIC-II setting -> Fullscreen settings -> Fullscreen device to VidMode instead of XRandR.
Then, going through the list of repositories of C64 games and programs listed earlier, searching for more online and adjusting the list. Hoping to find some of the old hits. Finding Elite, Le Mans, Infiltrator, Laser Squad, Usagi Yojimbo.
Wednesday, May 23, 2012
Running Google Earth on Fedora 17 x86_64
Today I've filed a bug report for an error trying to update redhat-lsb package (link). As a result of the latest changes, I had to uninstall "redhat-lsb.i686" package from my system.
Then I identified the cause for having this package installed in the first place. Trying to run Google Earth resulted in the message:
/usr/bin/google-earth: ./googleearth-bin: /lib/ld-lsb.so.3: bad ELF interpreter: No such file or directory
This package I had installed earlier in order to enable Google Earth to run on a 64-bit system. This was done following the advice in article Google Earth in 64-bit Linux (Fedora, Ubuntu).
Now, after installing latest lsb packages it was not possible anymore to install redhat-lsb.i686 package on Fedora 17 x86_64. Fortunately, I found an old bug report that also contains an extremely convenient workaround - LSB symbolic link (/lib/ld-lsb.so.3) is missing in x86_64 version redhat-lsb package.
Simply creating a symbolic link in /lib with
ln -s ld-linux.so.2 ld-lsb.so.3
will enable 32-bit applications to use the library and, in result, Google Earth will run without any problems on a 64-bit system.
Themes in Gnome
- window look
- icons
- cursors
Where to find?
Gnome-look.org site contains lots of theme packages for any of the above components. Apart from these, there's lots of other Linux/Gnome components that can be customized, like Nautilus, GDM, and so on.How to install?
Installation is quite simple. Once a theme is downloaded in .tar.gz format, unpack the directory from the archive into an appropriate location.- Window themes are to be found in /usr/share/themes.
- Icons and mouse cursors are in /usr/share/icons.
Once installed, these will be available through Gnome Tweak Tool or, in Cinnamon, through Theme settings.
My Favorites
My current favorites are listed below:Tuesday, May 22, 2012
NPM Registry - node.js plugins
There are many plugins written for Node.js so far. They can be downloaded using NPM (node package manager). At NPM Registry you can see which packages are most popular.
Packages can contain MVC frameworks, languages, modules for communication with data servers, etc.
Debugger Canvas for Visual Studio
A great add-on for Visual Studio: Debugger Canvas. Visual debugger, allowing you to visualize the whole code path being debugged, with all the related variables. It displays only the functions being stepped-through, not the whole content of the class or the code file the function belongs to. In their own words:
Debugger Canvas is a new user experience for the debugger in Visual Studio Ultimate. It pulls together the code you’re exploring onto a single pan-and-zoom display. As you hit breakpoints or step into code, Debugger Canvas shows just the methods that you’re debugging, with call lines and local variables, to help you see the bigger picture.
(link)
Wine Virtual Desktop from the Command Line
Some programs, when run with Wine under Linux, are next to useless when run without Virtual Desktop emulated by Wine. This usually happens when programs have dialog boxes, like Open File, displayed beside the main program window. In such a case, turning on the Virtual Desktop option in Wine solves these issues and the dialog boxes are displayed properly.
Unfortunately, there is no option to instruct Wine to use Virtual Desktop when run from the command line. There was (is?) an option for older versions of Wine, using "wine explore /desktop=default,1280x1024 <program.exe>" but this does not seem to work when run under Wine 1.5.3 that I have.
The good news is that there is a workaround available. You can use q4wine. Create a shortcut in there, setting all the properties as desired. There you can specify which Wine prefix to use and whether to use Virtual Desktop or not. Then, you can right-click the created shortcut, select Copy to Clipboard -> q4wine-cli cmd, and it will copy something like
/usr/bin/q4wine-cli -p "Quicken" -i "Quicken"
to clipboard. You can use this as an Exec line in the .desktop shortcut file that you can create in Gnome, for example. It will run the shortcut you created with the Virtual Desktop setting. This can be used for multiple purposes but I need it mostly in order to run Quicken, which prompts the user for certain input entries and confirmations on startup.
Monday, May 21, 2012
WebDAV in Linux
In Nautilus, you would go to File -> Connect to Server and then fill out the server details, or type in "davs://" and the server address.
In Dolphin, you would use "webdavs://" plus the server location.
In the examples above, I've used Secure WebDAV, which uses SSL (HTTPS) protocol. To use WebDAV over HTTP just omit the 's' at the end and use "dav://" or "webdav://" as protocol.
There are also other tools, like WebDAV Sync. Download from here and check Manual for usage instructions.
Thursday, May 17, 2012
'Low Space' on Samsung Galaxy S
- phone memory
- internal SD card
- external SD card
The drawback to the above approach is that the fast partition, where /datadata is stored, is only 170MB in size. Quite a few applications do not pay much attention where and how they store their files so this partition fills up pretty quickly. At first it was quite difficult to even understand how to see what has filled up. You can check the size and free space by using DiskUsage application and selecting /datadata as the location to be analyzed.
Some people recommended moving applications to SD card. This, however, does not solve anything in this case because it moves files from internal phone's 2GB partition to the SD card. But my 2GB partition was already 80% empty. Not knowing what was going on initially, I even used Titanium Backup to move some system applications to SD card. What a waste of effort.
The background information was scattered in different forum posts. A very useful one is here. That one contains a script that, if run on boot, would move all the files from /datadata to /data/data (from 170MB partition to 2GB partition) and then moves only the files that are *both* read and written into, back onto the fast /datadata partition. It creates symbolic links on the slow partition to these configuration files and databases, improving their performance. The /data location (being on 2GB partition) has good-enough read performance so libraries and other static files that are moved to /data/data still perform well.
This would be a great solution, only if it worked. I flashed the package into my Galaxy S, rebooted phone a few times but found out that /data/data was still a symbolic link to /datadata and all the files were still on the /datadata partition. As a result of running the script, /data/data was supposed to be converted to a real directory, with only the 'database' and a few other directories moved to /datadata. However, this was not the case.
So, knowing enough background information, and being encouraged to take things into my own hands by this post, I used Root Explorer to solve the problem:
- create /data/data_alen directory on 2GB partition,
- manually move iGo's whole directory (com.navngo.igo.javaclient) to /data/data_alen
- create symlink to com.navngo.igo.javaclient in /datadata
Edit 2012-07-24: After installing new CyanogenMod, the applications for which the data was moved to a different partition would force-close. I tried a few things, like restoring the data with Titanium Backup and moving it back-and-forth with Total Commander, but that did not work. What worked was reinstalling the application (or restoring the data with Titanium Backup) and moving the data to the large partition and creating symlink to it with Root Explorer.
I haven't experimented much since this seems to work. The "low space" is handled for the moment. When it comes back I'll post back the findings of further experiments.
Wednesday, May 16, 2012
Python Development on Windows
There are other posts in this blog that relate to Python. They can be found using the search box at the top of the page. I will link to useful ones here.
Development Environment
Windows
For Windows, actually .Net platform, there is Iron Python project (link).Other
- Py2exe (link)
Friday, May 11, 2012
Changing default system language in Fedora 17 Gnome
To change the default system language, use
system-config-language
In case you don't have it installed, simply install the package with the same name.
Once changed, the settings apply when you log in the next time.
Application Shortcuts in Gnome
#linux, Fedora 17, Gnome 3.4
To create application shortcuts in Gnome, simply create a .desktop file in
/home/<user>/.local/share/applications/
and they will become visible in the Applications menu or in application search. To get a sample, get one of the existing files or check the reference page below for the basic options.
References: Desktop Entry Files (link)
Fedora 17 Installation Checklist
Quick notes on Linux installation.
- Create Live USB drive.
- Run off the Live USB drive. Use Install to Hard Disk option.
- set Terminal window transparency and color scheme.
- install yum extension (yum-local, downloadonly, fastestmirror, priorities)
- Install apper (+KDE)
- install dolphin
- install Mono
- install Yakuake
- install workrave
- install Google Chrome and set up Chrome custom user agent (blog)
- install conky
- install nethogs
- set up KeePass with Mono, install xdotool
- install gnome extensions online
- install gnome-tweak-tool, add minimize to window context menu
- install mouse cursors
- install rainlendar (requires SDL)
- set startup apps using gnome-session-properties (rainlendar, conky, workrave)
- install lvm tools (system-config-lvm) and kde-partitionmanager
- install beyond compare
- add rpmfusion repositories
- install netactview
- install feh and set rotating desktop wallpapers
- unpack google appengine
- install google earth (redhat-lsb.i686, mesa-libGL.i686)
- install codecs for Totem movie player (ff...)
- sync Firefox
- install Adobe Flash plugin
- install download manager (gwget)
- install dropbox: download nautilus package, download daemon manually.
- install vlc
- install media codecs (mp3, mp4, ogg) - http://fedoraproject.org/wiki/Multimedia, http://ask.fedoraproject.org/question/1145/what-plugins-required-in-fedora-16-to-play-mp3 ( 'yum install gstreamer-{ffmpeg,plugins-{good,ugly,bad{,-free,-nonfree}}}' )
- install boost, boost-devel
- install git
- install skype (alsa-lib.i686 libXv.i686 libXScrnSaver.i686 qt.i686 qt-x11.i686)
- install banshee
- install p7zip, p7zip-plugins
- install Wine.i686 + q4wine
- download winetricks, install cabextract, samba-winbind, libmpg123
- install freemind
ToDo:
*****
- install libreoffice
- install @kde
- install vmware
- backup app startup scripts & settings (conkyrc, shell scripts, wine)
- set up app shortcuts in /usr/local/share/applications/
- install Netvisualize Favorites under wine
Package locations:
http://dl.fedoraproject.org/pub/fedora/linux/development/17/x86_64/os/Packages/
Wednesday, May 09, 2012
Gnome buttons on the titlebar
If you are missing Minimize and Maximize buttons in the window titlebar in Gnome 3, just install gnome-tweak-tool and go to Shell -> Arrangements of buttons on the titlebar, and set the value to All.
#linux
Document Viewer for Linux
The best document viewer for Linux I found is Okular. It reads PDF, CHM, and mobile formats.
Installing Linux Dropbox on a slow connection
Default Dropbox installation includes downloading and installing Nautilus extension first. It will add Dropbox icon/application link. When this is run for the first time, it will download and install proprietary daemon. However, on a slow link this download often fails if I use the connection for parallel downloads. Running it again will not continue the download but will download again from the start.
To download the daemon manually, we can run the following command:
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
Note that I'm using 64-bit version in the link above. Official instructions are available here.
Media Players on Linux
- Totem Movie Player as a fast-startup default player for audio and video
- Banshee player for music, with playlists and library
- VLC as a backup video player
Fedora 17: [Errno -1] Metadata file does not match checksum
To solve this, I'm using dl.fedoraproject.org as the primary URL for the fedora repository until the repolist and the database are downloaded.
If you get the above message try "yum clean all" although some mention that "yum clean metadata" should be enough. Then, in the fedora.repo, comment the line for mirrors and add a new line for the baseurl and add a desired mirror URL. I went straight to the source, with:
baseurl=http://dl.fedoraproject.org/pub/fedora/linux/development/$releasever/$basearch/os/
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=fedora-$releasever&arch=$basearch
Tuesday, May 08, 2012
Installing Skype on 64-bit Linux (Fedora 17)
The one-line command that installs all the required dependencies is:
Monday, May 07, 2012
LibreOffice (OpenOffice/StarOffice)
After Oracle brought chaos into Open Source world, a number of projects got renamed. Version of OpenOffice that branched off is named LibreOffice (link). Windows version is available for download, while Linux version is installed by default by a number of distributions.
The same way Jenkins (CI) grew out of Hudson project.
Windows 7 Service Pack 1 Preparation
Google Chrome in Windows is having an issue where it can not open sites via SSL (https). This has been quickly patched in stable versions because of publicity. However, the issue still exists in development channel. One way to get rid of it is to install Service Pack 1 for Windows 7.
While I had the offline installation of SP1, I was getting the dreadful error 0x8007000d (link) and had to install a whole bunch of other things first. Here's the list. (from Steps to follow before installing Windows 7 Service Pack 1, link)
- Windows Update Readiness Tool (300+ MB)
- KB2533552
- KB2454826
- KB2534366
Apart from these, I also did not have the option to install SP1 from Windows Update (described here - link). Running the readiness tool did not change anything.
In the end, I had to run the online installer, which did the magic behind the scenes and installed about 80 MB of updates.