Skip to content

Instantly share code, notes, and snippets.

View aloisdg's full-sized avatar
🏠
Working from home

Aloïs de Gouvello aloisdg

🏠
Working from home
View GitHub Profile
@aloisdg
aloisdg / A-Pen-by-AloisDeGouvello.markdown
Created January 29, 2014 02:36
A Pen by AloisDeGouvello.
@aloisdg
aloisdg / README.md
Created February 19, 2014 22:42 — forked from jxson/README.md

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

public class TileCanvas : Canvas
{
public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.Register(
"ImageSource",
typeof(ImageSource),
typeof(TileCanvas),
new PropertyMetadata(null, ImageSourceChanged));
private Size _lastActualSize;
@aloisdg
aloisdg / UrlToMarkdown
Last active August 29, 2015 14:21
Quick snippet to convert a plain url to markdown
using System;
using System.Text;
using System.Text.RegularExpressions;
using System.Net;
public class Program
{
public static void Main()
{
var s = @"https://dotnetfiddle.net/pMMcEN";
using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Interactivity;
using System.Windows.Media;
using Microsoft.Phone.Controls;
namespace PhoneApp1
{
public class PanAndZoomBehavior : Behavior<FrameworkElement>
@aloisdg
aloisdg / PngToJpg
Last active August 29, 2015 14:23
A simple script to convert quickly a bunch of png to jpg.
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Nito.AsyncEx;
namespace PngToJpg
using System;
using System.Diagnostics;
using System.Linq;
using System.Numerics;
public class Program
{
public static void Main()
{
double[] dset1 =
using System;
using System.Globalization;
using System.Linq;
public class Program
{
/// <see cref="https://en.wikipedia.org/wiki/Metric_prefix#List_of_SI_prefixes" />
public static void Main()
{
@aloisdg
aloisdg / SecretSanta.cs
Last active December 15, 2015 13:47
A script to generate a secret santa. Target can be discover by qrcode.
using System;
using System.Net;
using System.Collections.Generic;
// https://dotnetfiddle.net/NC4suH
public class Program
{
static readonly Random _rand = new Random();