Skip to content

Instantly share code, notes, and snippets.

To use Webster's 1913 dictionary on Android, install Colordict 3, an app that accepts this StarDict format. https://play.google.com/store/apps/details?id=com.socialnmobile.colordict

Next download James's S3 archive. https://s3.amazonaws.com/jsomers/dictionary.zip

You will need to extract the .dict file from inside three containers - .dz, .tar, .bz2 from innermost to outermost. 7zip handles all of these formats.

Place the .dict, .idx and .ifo files in the dictdata directory on your sdcard or local storage root. This is where colordict looks for dictionaries.

When the files are in the right place, you can run Colordict and tap the folder icon in the top right to see the dictionaries installed and set the dictionary priority. I put the 1913 dictionary above the defaults "Wordnet" and "Wikipedia." When you look up a word, ColorDict shows the definition, if available, from these multiple sources.

@therealplato
therealplato / gist:e4e01ff8fb6adc15c8da
Last active August 29, 2015 14:16
vigilant citizen snowpiercer edited
Snowpiercer is a movie about a "rescue train" that travels around the world, which was destroyed through a climate experiment and became hostile to any life on its surface.
Warning: Spoilers ahead!
At the beginning of the movie we get the message that planet Earth has been destroyed via spraying of a "cure" called CW-7. This "cure" was meant to save humanity from a global warming. This resembles chemtrails, about which we have heard quite a lot the last few years, and which have been spotted by many people in US and Europe as well. So the story in general could be about where mankind ended up after destroying its own planet, but as we get to know later from the story and as the structure of train shows us, the movie is more about where the human kind is right now, rather than where we might end up if the crazy advocates of global warming keep on pushing their agendas.
Even a not very bright viewer will probably quickly realise that the train represents the world and the hierarchy of
classes, i.e. the elite
@therealplato
therealplato / gameServer.js
Last active August 29, 2015 14:17
pubnub federated game servers
// gameServer.js
// npm install --save pubnub
// http://www.pubnub.com/docs/javascript/javascript-sdk.html
var j$ = JSON.stringify;
var jP = JSON.parse;
var game = require('./game.js'); // Local game server
var queue = []; // Global matchmaking queue
var pubnub = require("pubnub")({
I have an index.html loading kinetic-v3.8.3.js, hexlib.js and perspective.js in that order
I am trying to segregate the mathematics of a hex grid in my hexlib.js file, while keeping the code to draw hexes in perspective.js
I am trying to access a function that is defined in hexlib.js from perspective.js but I have screwed it up. Here is the trace yielded by Firebug:
error in perspective.js (line 33)
Sexy is not defined
[Break On This Error]
JReviews user form creation problem
I'm debugging a Joomla site that uses JReviews to store user reviews. The JReviews code has apparently been modified into a broken state.\
User forms are not being saved to the database when the user clicks Submit at the bottom of the form. I'm not sure if the server is receiving the data.
I'm using JReviews 2.3.12.203 and PHP 1.5. Unfortunately I'm running on godaddy hosting so I don't have access to php console error logs.
Details:
@therealplato
therealplato / nano_.js
Created June 4, 2012 16:57
leading underscore in documents fails nano's validation
nano = require('nano')('http://localhost:5984');
nano.db.create('underscore', function(err){
data = {foo:'bar', _ISNEW:true};
couchdb = nano.use('underscore');
couchdb.insert(data, function(err,body) {
console.log('err:\n'+err+'\nbody:\n'+body);
console.log('JSON.stringify(err):\n'+JSON.stringify(err,null,2));
});
});
// Example code by plato demonstrating fs and async
// Before running this: Create a file foo.txt in the same directory as this
// Additionally, run npm install async
var async = require('async');
var fs = require('fs');
handleimg = function(callback){
var raft={}; // to float down the waterfall
raft.meta = {size:50, name:"foo.txt"};
async.waterfall(
@therealplato
therealplato / plato-mediaquery.css
Created February 6, 2013 17:52
pixel density media query problem
/*
To size fonts we have to take into account the screen width and pixel density.
Assorted screen sizes and pixels per inch:
x_px y_px PPI
-----------------
G1 320 480 180
Nexus S 480 800 233
Iphone 4S 640 960 326
Iphone 5 640 1136 326
Ipad 2 768 1024 132
/*
To size fonts we have to take into account the screen width and pixel density.
Assorted screen sizes and pixels per inch:
x_px y_px PPI
-----------------
G1 320 480 180
Nexus S 480 800 233
Iphone 4S 640 960 326
Iphone 5 640 1136 326
Ipad 2 768 1024 132
/*
To size fonts we have to take into account the screen width and pixel density.
Assorted screen sizes and pixels per inch:
x_px y_px PPI
-----------------
G1 320 480 180
Nexus S 480 800 233
Iphone 4S 640 960 326
Iphone 5 640 1136 326
Ipad 2 768 1024 132