Skip to content

Instantly share code, notes, and snippets.

View saurabhrautela's full-sized avatar

Saurabh Rautela saurabhrautela

  • India
  • 21:46 (UTC +05:30)
View GitHub Profile
@saurabhrautela
saurabhrautela / generate_apple_secret.py
Created February 14, 2023 14:44
Python script to generate Apple client secret
"""Generate the client secret for Sign in with Apple.
Refer: https://developer.apple.com/documentation/sign_in_with_apple/generate_and_validate_tokens
"""
from datetime import datetime, timedelta
import jwt
"""Info
alg
The algorithm used to sign the token. For Sign in with Apple, use ES256.

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@saurabhrautela
saurabhrautela / SwapMousePrimary.cs
Created May 14, 2022 09:25
Swap mouse primary button.
// C:\Windows\Microsoft.NET\Framework64\v3.5\csc.exe .\SwapMousePrimary.cs
// Refer: https://stackoverflow.com/a/10509038
using System.Runtime.InteropServices;
using System;
class SwapMouse
{
[DllImport("user32.dll")]
public static extern Int32 SwapMouseButton(Int32 bSwap);
@saurabhrautela
saurabhrautela / kebase.md
Created May 8, 2021 02:51
keybase verification

Keybase proof

I hereby claim:

  • I am saurabhrautela on github.
  • I am saurabhrautela (https://keybase.io/saurabhrautela) on keybase.
  • I have a public key ASD7s0I2-dtrQDSPJg9xDFEwoe765nUZx5WnehCtPaDqFwo

To claim this, I am signing this object:

" For details on any item below:
" :help <item>
" TO view all the available options:
" :options
set listchars=eol:¬,tab:>~,trail:~,extends:>,precedes:<,space:·
set nu
set list
set expandtab
set tabstop=4