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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<form>
Nom:<br>
@aloisdg
aloisdg / ImAltScraper.js
Created September 22, 2016 09:33
Dans le cadre du module accessibilité, j'ai fait un script qui affiche tous les "alt" suivis de leur image liée.
// run this in firefox console (should work with chrome too)
$x("//img[contains(@alt,*)]").forEach(x=>console.log(`${x.alt};${x.src}`))
@aloisdg
aloisdg / scrap.ts
Created September 10, 2016 11:57
A tiny scrapper made with TypeScript and Cheerio
// https://www.codementor.io/nodejs/tutorial/how-to-write-a-web-scraper-in-nodejs
const cheerioReq = require("cheerio-req")
const fs = require('fs')
class Career { // secteur professionnel
name: string // private set
jobs: string[] // private set
constructor(name: string) {
this.name = name

Keybase proof

I hereby claim:

  • I am aloisdg on github.
  • I am aloidg (https://keybase.io/aloidg) on keybase.
  • I have a public key whose fingerprint is C4BF 8759 DECE 0341 77BE B4B1 5114 BD07 8058 0278

To claim this, I am signing this object:

@aloisdg
aloisdg / SolarizedTemplateForVS2015.vstheme.xml
Last active June 28, 2016 00:02
Warning this is a work in progress
<Themes>
<Theme Name="Solarized (Dark) (1)" GUID="{e904eafe-10c0-4c59-87fb-a0d2f4d8e7fc}">
<Category Name="Autos" GUID="{a7ee6bee-d0aa-4b2f-ad9d-748276a725f6}">
<Color Name="ChangedText">
<Background Type="CT_INVALID" Source="00000000" />
<Foreground Type="CT_RAW" Source="FFF7A1A1" />
</Color>
<Color Name="Plain Text">
<Background Type="CT_INVALID" Source="00000000" />
<Foreground Type="CT_INVALID" Source="00000000" />
@aloisdg
aloisdg / FiboMatrix.cs
Created June 26, 2016 21:06
Fibonacci the right way
using System;
using System.Linq;
using System.Collections.Generic;
public class Program
{
public static void Main()
{
Console.WriteLine(Fibo.GetNumber(1));

I improve @Jaex's idea a little bit. My problem with his solution is the error thrown by the solution explorer. It is not very clean.

So you have a file Client.cs with your class as partial:

public partial class Client {
    // your awesome code comes here
}

In another file ClientKeys.cs with your class as partial, you will add your keys:

After reading the Functional Toolbox by @markonis, I wanted to write a quick table to compare with System.Linq's name.

function Linq
sort [OrderBy][1]
map [Select][2]
filter [Where][3]
reduce [Aggregate][4]
take while [TakeWhile][5]
@aloisdg
aloisdg / WindowsTakesTheBlack.md
Created May 19, 2016 20:12
Windows10 takes the black

How to switch your Windows Theme from Light To Dark

It is a classic windows utopy to use a Dark theme on Windows. At each new Windows install I have done (and I've done a lot recently), I think about finding a way to achieve it. Lets go.

Part 1 Metro

I found a quick way on Windows Central with a regedit edit.

In an article, HowToGeek share a similar way to achieve this.