Skip to content

Instantly share code, notes, and snippets.

View 71's full-sized avatar

Grégoire Geis 71

View GitHub Profile
/*
______ _ _ _ _____ _ _ ___________ ___ ______ _____ ___________
| ___| | | | | | ___| \ | |_ _| ___ \/ _ \ | ___ \/ ___| ___| ___ \
| |_ | | | | | | |__ | \| | | | | |_/ / /_\ \| |_/ /\ `--.| |__ | |_/ /
| _| | | | | | | __|| . ` | | | | __/| _ || / `--. \ __|| /
| | | |___| |_| | |___| |\ | | | | | | | | || |\ \ /\__/ / |___| |\ \
\_| \_____/\___/\____/\_| \_/ \_/ \_| \_| |_/\_| \_|\____/\____/\_| \_|
/*
______ _____ _____ _____ _ _ ___________ _____
| ___ \ ___/ ___|_ _| | | || ___| ___ \ _ |
| |_/ / |__ \ `--. | | | |_| || |__ | |_/ / | | |
| /| __| `--. \ | | | _ || __|| /| | | |
| |\ \| |___/\__/ / | | | | | || |___| |\ \\ \_/ /
\_| \_\____/\____/ \_/ \_| |_/\____/\_| \_|\___/
@71
71 / SystemProgram.cs
Last active July 30, 2016 18:30
Program.cs file that is guaranteed to execute with SYSTEM rights, thanks to MS16-032. Works with .NET 3.5+.
namespace SystemApp
{
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Diagnostics;
using System.Threading;
using System;
using System.Reflection;
@71
71 / keybase.md
Last active November 5, 2018 17:52

Keybase proof

I hereby claim:

  • I am 71 on github.
  • I am 71 (https://keybase.io/71) on keybase.
  • I have a public key ASBQya_3rkXhK63rxpae_sICqJTKCqbm5aUgYjseLWoycQo

To claim this, I am signing this object:

@71
71 / ExampleAsync.cs
Last active January 25, 2023 20:34
A file I used to understand how async / await works behind-the-scenes in C#.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
namespace Tests
{
/// <summary>
@71
71 / FbWatch.js
Last active April 8, 2017 12:21
Simple script that tells me "You've been on Facebook n minutes now, c'mon." when I spend too much time on Facebook.
// ==UserScript==
// @name Facebook watcher
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Makes sure you don't spend too much time on Facebook
// @author You
// @require http://coffeescript.org/v1/browser-compiler/coffee-script.js
// @match https://www.facebook.com/*
// ==/UserScript==
@71
71 / Get-NgrokStatus.ps1
Created August 26, 2017 20:51
PowerShell module used to easily get the status of an Ngrok user.
<#
.SYNOPSIS
Gets the status of an Ngrok user.
.EXAMPLE
Get-NgrokStatus -Credential (Get-Credential)
#>
function Get-NgrokStatus([Parameter(Mandatory=$true)] [PSCredential] $Credential) {
# Find CSRF Token
$Req = Invoke-WebRequest 'https://dashboard.ngrok.com/user/login' -UseBasicParsing -SessionVariable Session
@71
71 / Profile.ps1
Last active December 15, 2019 21:04
A file that reminds me of every step to do when setting up a new Windows machine.
# Load all init scripts
Get-ChildItem $Home\OneDrive\Code\PowerShellInit\* -Include *.ps1 -Recurse | % { . $_ }
@71
71 / Make-Submission.ps1
Last active November 17, 2017 15:24
Make an EPITA submission using PowerShell.
<#
.SYNOPSIS
Creates a .zip file matching the submission format required by EPITA.
.EXAMPLE
Make-Submission -Author gregoire.geis -Nth 0 -Items ./TP0 -Exclude bin,obj -ReadMe "First submission!"
Make-Submission -Author gregoire.geis -Nth 0 -Items tp0.ml
#>
function Make-Submission (
[Parameter(Mandatory=$true)] [string] $Author,
@71
71 / SpecialChars.ahk
Last active November 16, 2021 22:26
My personal keyboard layout, named after its WASD replacement YATH.
; AutoHotKey script that sends the right symbols to Windows.
; Useful, since I can reprogram most of my keys on my keyboard, but not special characters.
#NoEnv
SendMode Input
$1::Send {1}
$2::Send {2}
$3::Send {3}
$4::Send {4}