Skip to content

Instantly share code, notes, and snippets.

@Xananax
Xananax / googleMapsStyles
Created July 17, 2014 19:40
An array of google maps styles stolen from snazzymaps
// Array of google maps styles
// for quickly testing and experimenting different styles
// courtesy of http://snazzymaps.com/
// this is not all the maps, just a personal collection
// the final object is an array like but you can also get properties by name
// so obj[0] is equivalent to obj['apple-maps-esque']
// the string keys are not enumerable, so if you loop through the object you'll get only numeric indices
// also, for more easiness to use in templates, the toString() function of each style returns a json string
// (Check the commented loops on the bottom)
@Xananax
Xananax / client.js
Last active January 15, 2016 13:11
Front-end validation with node.js forms
$(document).ready(function() {
var $form = $('#Form'),form_check_url='/form_check',cached_fields,get_cached_field,check_form,current_field,visited_fields,bypass_visited=false;
if($form.length){
cached_fields = {};
visited_fields = {};
get_cached_field = function(name){
var field;
if(!cached_fields.hasOwnProperty(name)){
field = $('#id_'+name,$form);

DeusInMachina (working title)

Template system to create behaviours attached to game objects.

Properties

properties are numbers such as:

  • health
  • resistance (and affiliates, resistance to poison, resistance to cold...)
  • skills (ranged weapons, lockpicking)
/**********************************************************
Utility to load modules while passing context.
Equivalent to using 'require()', but modules
aren't cached, so it can be used to load files that
change.
The second benefit is passing a context object, which
allows to have globals without polluting node.js
global space.
The default context object passes require & console.
You can pass your own with your own functions, or
@Xananax
Xananax / Design.md
Last active August 29, 2015 14:15
Olga Review

Design Commentary

In general, everything looks good. Seems it's not responsive yet, so I will refrain on commenting on any spacing/sizing and such.

The header links that go bold are annoying, because they change size, so it changes their position. I don't know if there is anything to do about this, maybe move every title a few pixels when they're not hovered to make up for the 1/2px change, or maybe using text-shadow instead of the bold text?

There is sort of a lack of consistency in the icons usage; They are used in the menu (and yet, the icons of "Aktashef" and of "Tassafa77" don't seem like they are designed by the same team), but nowhere else. Why have them at all?

I really dig the default blue links and the white background, it makes the website seem very straightforward and like it won't mess with your browser; However, it seems in general to be lacking content a little bit (maybe that's because there isn't really a lot of content yet). It seems a bit empty.

<?xml version="1.0" standalone="yes"?>
<LaunchBox>
<Game>
<ID>3d183397-20d4-4f32-8fe8-41fd230bb3a2</ID>
<Title>Baryon</Title>
<ReleaseDate>1995-01-01T17:21:48+02:00</ReleaseDate>
<Rating />
<Genre>Shooter</Genre>
<Platform>MS-DOS</Platform>
<Developer>ACRO Studio</Developer>

Remote Collaboration for teams

The Easy

  • Sharing of documents: [google drive][1] or [zoho][2]
  • Collaborative editing/notes/knowledge base: [Hackpad][3] (free for public pads, 2$/user/m for private workspaces with +5 users)
  • Issue tracker: [Github][4]
  • Tasks Management:
    • [Github][4] + [Waffle][5] (free for public repos, 5$/user/m otherwise)
  • or [Github][4] + [huboard][6] (free for public repos, 24$/m otherwise)
CREATE TABLE tag (
id serial primary key,
name text not null,
parent integer references tag(id),
unique (parent, name)
);
CREATE TABLE photo (
id serial primary key,
path text not null
class Directory extends Component{
renderDirectories(){
const {directories} = this.props;
if(!directories || !directories.length){
return false;
}
return directories.map((dir,key)=>
<tr key={key}><td>
<Directory {...dir}/>
</td></tr>
function renderDirectories(directories,pKey,onClick){
if(!directories || !directories.length){return false;}
return directories.map((directory,key)=>{
const {
name
, directories
, files
} = directory;
return renderNotRoot(