Skip to content

Instantly share code, notes, and snippets.

@michelc
michelc / montchamps.md
Created February 22, 2021 11:26
Les drailles de Montchamps

Les drailles de Montchamps

Informations

  • Niveau : moyen
  • Durée : 3h
  • Distance : 10,5 km
  • Dénivelé : 267 m

Départ : place du Marché aux Cerises

@michelc
michelc / quick_server.js
Last active December 7, 2016 15:28
Node.JS static file web server
// Node.JS static file web server
// ------------------------------
// Created from https://gist.github.com/ryanflorence/701407
var http = require("http")
, url = require("url")
, path = require("path")
, fs = require("fs")
, port = process.argv[2] || 8888;
@michelc
michelc / Microsoft.PowerShell_profile.ps1
Created January 8, 2015 10:34
Mon fichier C:\Users\nom.prenom\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
# Update with PowerShell:
# PS> notepad $profile
# Use Git and Posh-Git from GitHub for Windows
# Source: http://blog.somewhatabstract.com/2014/09/01/getting-posh-git-in-all-your-powershell-consoles-using-github-for-windows/
# Add paths for Git and Posh-Git from GitHub for Windows
# - (git)\cmd => gives access to "git.cmd"
# - (git)\bin => gives access to "ssh-agent.exe"
@michelc
michelc / PixelX2.cs
Last active August 29, 2015 14:02
Agrandissement des icones météo en remplaçant chaque pixel par un carré de 4 pixels de même couleur.
using System.Drawing;
using System.Drawing.Imaging;
namespace PixelX2
{
class Program
{
static void Main(string[] args)
{
for (int w = 0; w < 48; w++)
@michelc
michelc / repertoir-build
Created September 11, 2013 07:40
Build failed: An error occurred during the build (build id = 113b73dbcfbfa06f1bf7a1b1b4c40102bf4db91d)
Build started 9/10/2013 9:48:43 PM.
1>Project "D:\temp\0zhcbpz4.t3v\input\Repertoir.sln" on node 1 (default targets).
1>ValidateSolutionConfiguration:
Building solution configuration "Release|Any CPU".
1>Project "D:\temp\0zhcbpz4.t3v\input\Repertoir.sln" (1) is building "D:\temp\0zhcbpz4.t3v\input\Repertoir\Repertoir.csproj" (2) on node 1 (default targets).
2>RestorePackages:
"D:\temp\0zhcbpz4.t3v\input\.nuget\nuget.exe" install "D:\temp\0zhcbpz4.t3v\input\Repertoir\packages.config" -source "" -RequireConsent -solutionDir "D:\temp\0zhcbpz4.t3v\input\ "
Restoring NuGet packages...
To prevent NuGet from downloading packages during build, open the Visual Studio Options dialog, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages'.
1>Project "D:\temp\0zhcbpz4.t3v\input\Repertoir.sln" (1) is building "D:\temp\0zhcbpz4.t3v\input\Repertoir.Tests\Repertoir.Tests.csproj" (4) on node 2 (default targets).
@michelc
michelc / index.html
Created April 12, 2012 20:39
30 Days to Learn jQuery - Homework
<!doctype html>
<html>
<head>
<meta charset=utf-8>
<title>30 Days to Learn jQuery - Homework</title>
<style>
div.box { width: 400px;}
</style>
</head>
<body>
C:\Ruby\_projets\bug>ruby main.rb
== Sinatra/1.1.0 has taken the stage on 3000 for development with backup from WEBrick
[2010-11-25 08:52:36] INFO WEBrick 1.3.1
[2010-11-25 08:52:36] INFO ruby 1.9.1 (2010-07-02) [i386-mingw32]
[2010-11-25 08:52:36] INFO WEBrick::HTTPServer#start: pid=3328 port=3000
Encoding::InvalidByteSequenceError - "\xC3" on US-ASCII:
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:465:in `encode'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:465:in `render'
C:/Ruby/lib/ruby/gems/1.9.1/gems/sinatra-1.1.0/lib/sinatra/base.rb:362:in `erb'
./views/main.rhtml:9:in `__tilt_7971cf99b99f4521191add94b12ea35e'
@michelc
michelc / gist:573348
Created September 10, 2010 09:06
Liste des départements limitrophes
public static string Limitrophes(string Departement) {
string limitrophes = string.Empty;
switch (Departement)
{
case "01": limitrophes = "38,39,69,71,73,74"; break;
case "02": limitrophes = "08,51,59,60,77,80"; break;
case "03": limitrophes = "18,23,42,58,63,71"; break;
case "04": limitrophes = "05,06,26,83,84"; break;
case "05": limitrophes = "04,26,38,73"; break;
case "06": limitrophes = "04,83"; break;