Instantly share code, notes, and snippets.

View Tournoi.css
body
{
display: flex;
flex-direction: column;
}
#ParticipantList
{
max-width: 500px;
}
View TypeScriptDecorators.ts
// TypeScript decorators.
// Shows how decorators compose, how to pass parameters.
// For classes, shows how to enrich a class and alter the constructor.
// You can just paste this gist in the TS playground...
//import "reflect-metadata"; // Cause error in playground
// tslint:disable no-console // These are for demo purpose
// tslint:disable member-access // Simpler
View RxCustomObservable.js
// Make a RxJS custom observable, using the pattern seen in rx.angular.js and RxJS-DOM.
// This is a skeleton, with meaningless code at the core, it is only to show the pattern.
/* global define */// Appeases ESLint
/* eslint no-invalid-this: 0 */
// UMD (global & AMD & Common.js) loader
(function __iife(root, factory)
{
// The AMD way
View Example.csv
Area Type Town name number value region sub-region
Unknown Area Type Hlegu 1511.19895194 Yangon Yangon, (North)
Unknown Area Type Cocokyun 33.8113207395 Yangon Yangon, (South)
Unknown Area Type Mese 1818.94431751 Kayah Bawlake
View index.txt
Using https://atom.io/packages/sync-settings
View atom-perforce.js
'use strict';
var atomPerforce = module, // sugary alias
path = require('path'),
os = require('os'),
p4 = require('node-perforce'),
Q = require('q'),
$ = require('jquery'),
environment = require('./environment'),
clientStatusBarElement = $('<div/>')
View ReadMe.md

Add validation to WP-Members (WordPress plugin) registration form

I maintain a small French WordPress site: http://entraides-citoyennes.org/ It was made by design students which made a great work with looks, but a so-so technical work... So I had to fix the issues.

They used a iFeature 5 theme by CyberChimps, they made a .css file in a child theme. I had to make CSS fixes to get labels of the registration form (made with the WP-Members plugins) to be aligned with the input fields...

WP-Members is a nice plugin, rather flexible as it allows to add custom fields to registration.

View anchor.js
/* Anchor array: [ x, y, dx, dy ]
x, y (close of square): position on node, 0.0 to 1.0
dx, dy (end of arrows): direction, -1, 0 or 1
0,-1
^
|
+
0,0 0.5,0 1,0
+----------+
View ReadMe.md
View Lozenge.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.