Skip to content

Instantly share code, notes, and snippets.

View PhiLhoSoft's full-sized avatar

Philippe Lhoste PhiLhoSoft

View GitHub Profile
@PhiLhoSoft
PhiLhoSoft / ReadMe.md
Created June 23, 2015 13:28
Improving Most.js' Drag'n'Drop example
@PhiLhoSoft
PhiLhoSoft / Lozenge.svg
Created June 18, 2015 11:40
Testing if Gists show a preview of SVG
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@PhiLhoSoft
PhiLhoSoft / ConvertGeoJsonToAdHocJson.js
Last active August 29, 2015 14:23
Convert (some kind of) GeoJson file to a (specific kind of) Json file, in SVG path format, using Node.js platform
// Convert a limited / specific subset of GeoJson (the samples I had to convert...) to a specific Json format (for HighMaps),
// using the SVG path format.
// Made to run on the Node.js platform.
// Should accept more encodings, using a conversion library.
var fs = require('fs');
var arguments = process.argv;
//~ var inputFileName = __dirname + '/config.json';
var inputFileName = arguments[2], outputFileName, encoding;
@PhiLhoSoft
PhiLhoSoft / index.html
Created May 1, 2015 08:08
First application with Mithril
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Playing with Mithril</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>Playing with <a href="http://lhorie.github.io/mithril/">Mithril</a></h1>
@PhiLhoSoft
PhiLhoSoft / FizzBuzz.ceylon
Last active August 29, 2015 14:14
Ceylon functional FizzBuzz, two versions
shared void fizzBuzz()
{
print("## FizzBuzz 1 ##");
Iterable<String> fizzBuzz1(Integer count = 20)
{
return (1 .. count).map((Integer c) =>
15.divides(c) then "FizzBuzz" else
(3.divides(c) then "Fizz" else
(5.divides(c) then "Buzz" else c.string)));
}
@PhiLhoSoft
PhiLhoSoft / showheaders.js
Created August 29, 2013 05:55
Minor changes from the showheaders.js found at http://bgrins.github.io/devtools-snippets/ Discovering some nice features...
// showheaders.js
// Little changes (for Firebug) from https://github.com/bgrins/devtools-snippets
// Print out response headers for current URL.
(function()
{
var request = new XMLHttpRequest();
request.open('HEAD', window.location, false);
request.send(null);
@PhiLhoSoft
PhiLhoSoft / AutomatedWriter.ahk
Last active December 14, 2015 03:49
AutoHotkey script to draw letters, digits and some punctuation characters with the mouse.Designed to draw on BigCanvas, but tested on Windows Paint and should work on any similar program.
/*
// by Philippe Lhoste <PhiLho(a)GMX.net> http://Phi.Lho.free.fr
// File/Project history:
1.00.000 -- Today (PL) -- Lastest version (updated regularly!).
0.01.000 -- 2013/02/12 (PL) -- Creation.
*/
/* Copyright notice: For details, see the following file:
http://Phi.Lho.free.fr/softwares/PhiLhoSoft/PhiLhoSoftLicence.txt
This program is distributed under the zlib/libpng license.
Copyright (c) 2013 Philippe Lhoste / PhiLhoSoft
@PhiLhoSoft
PhiLhoSoft / BigCanvas
Last active December 13, 2015 20:39
BigCanvas: http://bigcanvas.frozenfractal.com My drawings. At least, they are mine at the time of referencing, they can be altered, defaced, obliterated, etc.
Small island with a palm tree, an ugly guy
http://bigcanvas.frozenfractal.com/#.Q,6,446,492
A shark
http://bigcanvas.frozenfractal.com/#AX,XO,56,17
Japanese skewer
http://bigcanvas.frozenfractal.com/#Dn,KG,324,389
Weight and hammer, mouse and bird
http://bigcanvas.frozenfractal.com/#a,l,240,492
Transform part of the big dashed line into a stair, and someone (?) climbing it
http://bigcanvas.frozenfractal.com/#.Oz,x,73,246