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
// source: https://www.tekrevue.com/tip/find-windows-spotlight-lock-screen-images-windows-10/
let (</>) path1 path2 = System.IO.Path.Combine (path1, path2)
let toJpg x = x + ".jpg"
let copyTo dest from = System.IO.File.Copy(from, dest) |> ignore
// let assetPath = """.\%LocalAppData%\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets"""
let localAppData = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData)
let pathToAssets = localAppData </> """Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets"""
let myPictures = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyPictures)
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
.geolocation-default {
module Tests
open System
open Xunit
let cycle inputs =
let list = inputs |> Seq.skip 1
let head = inputs |> Seq.head
Seq.append list [head]
@aloisdg
aloisdg / vpn.md
Last active April 11, 2019 11:47

Quel VPN conseilles-tu?

En matière de VPN, je ne suis pas des plus calés et je recommande à toujours de faire ses propres recherches en ligne. De plus, c'est un monde qui évolue vite et donc toute recommendation peu vite périmer. Mettons que tout de même on me demande mon avis. Un VPN est un outil. Choisir un VPN va dépendre de son usage.

Je veux protéger ma vie privé en ligne et je veux bien donner un peu d'argent à une asso

Excellent! Tu ne vas pas avoir besoin de beaucoup de data et un petit VPN fera amplement l'affaire. Je te recommande le [VPN][VPNFDN] du [FDN][FDN].

French Data Network (FDN) est une association française (association loi de 1901 - sans but lucratif) fondée le 2 juin 1992. Son but est : « la promotion, l’utilisation et le développement des réseaux Internet et Usenet dans le respect de leur éthique, en favorisant en particulier les utilisations à des fins de recherche et d’éducation sans volonté commerciale ». source: [wikipedia][FDNWiki]

using System;
using System.Linq;
using System.Collections.Generic;
// https://rpg.stackexchange.com/a/133360/11129
public class Program
{
public class Player
{
public string Name
using System;
using System.Linq;
public class Program
{
public static bool Contains(int[] ints, int k)
{
if (ints.Length == 0)
return false;
@aloisdg
aloisdg / pokemon.py
Created July 20, 2018 14:52
Get pokemon coloriage
import requests
import unittest
import sys
from pathlib import Path
# http://www.supercoloring.com/coloring-pages/cartoons/pokemon/generation-i-pokemon?page=1
# [...document.querySelectorAll('.node > div.content > div > div > div > a > img')].map(x => x.src.replace('coloring_thumbnail', 'coloring_full')).map(x => `"${x}"`).join(',\n')
def getUrls():
urls = [
"http://www.supercoloring.com/sites/default/files/styles/coloring_full/public/cif/2015/07/025-pikachu-coloring-page.png",
import requests
import unittest
import sys
from pathlib import Path
# http://www.dinosaur-coloring.com/
# [...document.querySelectorAll('#mainContent > p:nth-child(3) > a')].map(x => x.href.replace('/pages/', '/pdfs/').replace('.html', '.pdf')).map(x => `"${x}"`).join(',\n')
def getUrls():
urls = [
"http://www.dinosaur-coloring.com/pdfs/dinosaur-coloring-allosaurus.pdf",
open System
let withCommandWord isThereACommandWord cost =
cost * (if isThereACommandWord then 1800 else 2000)
let withNumberOfCharges numberOfCharge cost =
cost / 5 * numberOfCharge
let addComponentCost componentCost cost =
componentCost + cost