Skip to content

Instantly share code, notes, and snippets.

View daiplusplus's full-sized avatar
💀

Dai daiplusplus

💀
View GitHub Profile
@fnky
fnky / stripe-keys-and-ids.tsv
Last active May 5, 2024 19:31
Stripe keys and IDs
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.
//
// Author: Jonathan Blow
// Version: 1
// Date: 31 August, 2018
//
// This code is released under the MIT license, which you can find at
//
// https://opensource.org/licenses/MIT
//
//
@johnazariah
johnazariah / LinqExtensions.cs
Last active March 28, 2024 08:50
Maybe Monad in C#
public static partial class LinqExtensions
{
public static Maybe<C> SelectMany<A, B, C>(this Maybe<A> ma, Func<A, Maybe<B>> f, Func<A, B, C> select) => ma.Bind(a => f(a).Map(b => select(a, b)));
}
@al3xtjames
al3xtjames / xps_9560_ifr.txt
Last active April 2, 2024 10:35
Dell XPS 15 9560 (1.2.5) NVRAM edits
# Set Intel(R) Speed Shift Technology to Enabled
setup_var 0x4BC 0x1
# Set CFG Lock to Disabled
setup_var 0x4ED 0x0
# Set Above 4GB MMIO BIOS assignment to Enabled
# setup_var 0x79A 0x1
# Set EHCI Hand-off to Disabled
# setup_var 0x2 0x0
# Set XHCI Hand-off to Disabled
@chilversc
chilversc / SortProject.linq
Created October 25, 2016 15:26
Sort msbuild project items
<Query Kind="Program" />
static XNamespace ns = "http://schemas.microsoft.com/developer/msbuild/2003";
static XName ItemGroup = ns + "ItemGroup";
static XName Reference = ns + "Reference";
static XName ProjectReference = ns + "ProjectReference";
static XName Condition = "Condition";
static XName Include = "Include";
static XName OutputType = ns + "OutputType";
static XName Folder = ns + "Folder";
@joelverhagen
joelverhagen / RedirectingHandler.cs
Last active January 16, 2024 05:04
RedirectingHandler
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
namespace Knapcode.Http.Handlers
{
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,