List of all CSS color properties

I couldn’t find a list, so here it is – -webkit-column-rule-color -webkit-column-rule-color -webkit-column-rule-color -webkit-print-color-adjust -webkit-print-color-adjust -webkit-print-color-adjust -webkit-tap-highlight-color -webkit-text-emphasis-color -webkit-text-emphasis-color -webkit-text-emphasis-color -webkit-text-emphasis-color -webkit-text-fill-color -webkit-text-fill-color -webkit-text-stroke-color -webkit-text-stroke-color background-color border-bottom-color border-bottom-color border-bottom-color border-left-color border-left-color border-right-color border-top-color border-top-color border-top-color border-top-color flood-color lighting-color outline-color stop-color Note that this changes over time as new features are added, and by browser, and […]

Using AppSettings in AppHarbor to keep connection strings out of your git repository

When you generate a new entity framework project in C#, it generates an Application context object, which is very insistent on reading it’s connection from the connection strings settings of the web.config: public class ApplicationDbContext : IdentityDbContext<ApplicationUser> { public ApplicationDbContext() : base("DefaultConnection", throwIfV1Schema: false) { }   public static ApplicationDbContext Create() { return new ApplicationDbContext(); […]

Getting a list of all colors on a webpage

To get all colors on a page with jQuery, you can use the “*” selector to get all DOM elements, call “getComputedStyle” on each element, and then de-duplicate the results: var elements = $(’*’);   function getColor(i, v) { return window.getComputedStyle(v).color }   colors = $.unique(elements.map(m)); <pre>   Unfortunately this gives you just CSS, and […]

Scala fold example (fold over tuples)

The variations on “fold” let you condense a Scala collection into a single value. This example shows how you might find a named column in a CSV file, by calling “zip” on the list of headers and cells, then doing a lookup with foldLeft: val searchColumn = "Name" val headers = "Name,Quantity,Amount" val row = […]

Fixing Oracle installer error PRVF-7501 : Sufficient space is not available at location “/tmp”

If your “/tmp” location is limited in space, you can experience the following error installing Oracle 12c: INFO: INFO: ERROR: [ResultSet.addErrorDescription:1078] PRVF-7501 : Sufficient space is not available at location "/tmp" on node "ora" [Required space = 1GB ] To fix this (and avoid various similar errors), you should make a location on a drive […]

Installing Solr 5.x on CentOS 7

To install Solr 5.+ on centos 7, you need a JDK, preferably 64 bit: yum search openjdk   yum -y install java-1.8.0-openjdk.x86_64 Then, download from a mirror and extract Solr: wget http://mirrors.gigenet.com/apache/lucene/solr/5.2.1/solr-5.2.1.tgz   tar xvf solr-5.2.1.tgz If everything worked, it should be simple to start: cd solr-5.2.1   bin/solr start -h 45.55.156.155 -p 8000 To […]

Fixing “Cannot allocate memory” with Solr 5.2.1

If you run Solr on a VM, it may appear to start and fail. bin/solr start -p 8000 -f If you run it with “-f” (preventing backgrounding the process) you will then seen an out of memory error: Starting Solr on port 8983 from /root/solr-5.2.1/server OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000e8000000, 402653184, 0) failed; […]