Skip to content

Instantly share code, notes, and snippets.

View rsrini7's full-sized avatar
😃
Happy

Srinivasan Ragothaman rsrini7

😃
Happy
View GitHub Profile
/**
* Subtractive Color Wheel
* by Ira Greenberg.
* Tint routine modified by Miles DeCoster
*
* The primaries are red, yellow, and blue. The secondaries are green,
* purple, and orange. The tertiaries are yellow-orange, red-orange,
* red-purple, blue-purple, blue-green, and yellow-green.
*
* Updated 10 January 2013.
@rsrini7
rsrini7 / oracle_basic_user_setup.sql
Created February 11, 2016 05:04
basic oracle user setup
connect system/<password> as sysdba
create user srini identified by srini;
grant create session to srini;
grant create table to srini;
grant unlimited tablespace to srini;
@rsrini7
rsrini7 / visualvm.md
Created April 26, 2016 04:39 — forked from uarun/visualvm.md
Profiling a remote host using VisualVM

Remote VisualVM

Start RMI registry

$ rmiregistry -J-Djava.rmi.server.codebase=file:$JAVA_HOME/lib/tools.jar

Create Policy file for jstatd

  • Create a file named jstatd.all.policy
  • With the following contents:
About HDMI-CEC: CEC (Consumer Electronics Control) is the control protocol found in HDMI. You may have heard of CEC in another form: Bravialink, Simplink or Anynet+ are a few other names depending on the brand. This adapter allows your HTPC to join that communication channel. Currently, almost all graphics cards do not support CEC in any form, and others only in a limited form. This device allows Kodi and libCEC to access the CEC communications link and send and receive control messages. How CEC works for you: The USB - CEC Adapter allows Kodi to turn your TV and other attached equipment on and off (if they support HDMI CEC) adjust the volume or eject the disk from a drive, start playback, etc. Likewise these same devices can tell Kodi what to do. For example, your TV remote can also control Kodi, or vice versa. This device means less clutter and an easier remote for simple control.
My application has a lot of threads and is running out of memory, why? You may be running into a problem with the default stack size for threads. In Java SE 6, the default on Sparc is 512k in the 32-bit VM, and 1024k in the 64-bit VM. On x86 Solaris/Linux it is 320k in the 32-bit VM and 1024k in the 64-bit VM. On Windows, the default thread stack size is read from the binary (java.exe). As of Java SE 6, this value is 320k in the 32-bit VM and 1024k in the 64-bit VM. You can reduce your stack size by running with the -Xss option. For example: java -server -Xss64k Note that on some versions of Windows, the OS may round up thread stack sizes using very coarse granularity. If the requested size is less than the default size by 1K or more, the stack size is rounded up to the default; otherwise, the stack size is rounded up to a multiple of 1 MB. 64k is the least amount of stack space allowed per thread.
Compile Eventmachine 1.0.3 in Ruby 2.1.3 on Windows
eventmachine didn’t release a new gems for a long time, so we have to manually compile if you decide using Ruby 2.1.3, it’s probably the most complex gems which can still successfully install on windows as far as I known, here is the steps for your interesting:
Install DevKit
Run the command below to install bluecloth:
gem install bluecloth
this will fail miserably when building "native extensions", but will successfully install the gem's source code.
GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 2524246B1CC723DB
The clue here is the last string of characters, which is the public key. In order to add the key for this particular PPA (or repository), issue the command:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys KEY_ID
Where KEY_ID is the last string of characters in the error (in this case 2524246B1CC723DB).
Problem: apt-get-repository Command is Missing
I was trying to install the latest version of git from the Ubuntu Git Maintainers Team and I needed to add a Personal Package Archive (PPA) to the Software Sources. But when I tried to do this, I got an error:
?
sudo: add-apt-repository: command not found
Solution: Install the software-properties-common Package
To get the add-apt-repository command, install the software-properties-common package. For my Ubuntu version (precise), I also had to install the python-software-properties package: