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
<div id="qunit"></div>
<div id="qunit-fixture"></div>
@aloisdg
aloisdg / CardGenerator.cs
Created July 2, 2017 18:50
This is a function for creating a valid-ish credit card number
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CardGenerator
{
/*
* Original instructions https://www.nerdwallet.com/blog/credit-cards/credit-card-numbers-valid-website-luhn-algorithm/
@aloisdg
aloisdg / Alphabet.cs
Created January 24, 2017 20:39 — forked from dgritsko/Alphabet.cs
Naive bijective function in C#. http://stackoverflow.com/questions/742013
namespace Alphabet
{
public class AlphabetTest
{
public static readonly string Alphabet = "abcdefghijklmnopqrstuvwxyz0123456789";
public static readonly int Base = Alphabet.Length;
public static string Encode(int i)
{
if (i == 0) return Alphabet[0].ToString();
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>
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 / 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