Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View adeperio's full-sized avatar

Antonio de Perio adeperio

View GitHub Profile
@adeperio
adeperio / AuthService.js
Last active January 8, 2022 20:06
PKCE flow in Electron with Passwordless. In ES6 + flow + request-promise. Executes PKCE through the Electron BrowserWindow
//@flow
import request from 'request'
import crypto from 'crypto'
import rp from 'request-promise'
export type AuthServiceConfig = {
authorizeEndpoint: string,
clientId: string,
audience: string,
scope: string,
ps aux | grep node
kill -9 PID
@adeperio
adeperio / UniqueRandomStringGenerator
Created April 29, 2013 05:49
How to generate a unique string using the FIPS compliant Microsoft Crypto Libraries
using System.Security.Cryptography;
using System.Text;
namespace UniqueKey
{
public class KeyGenerator
{
public static string GetUniqueKey(int maxSize)
{
char[] chars = new char[62];
@adeperio
adeperio / KeychainItemWrapper.h
Created May 30, 2012 13:27 — forked from dhoerl/KeychainItemWrapper.h
KeychainItemWrapper ARCified
/*
File: KeychainItemWrapper.h
Abstract:
Objective-C wrapper for accessing a single keychain item.
Version: 1.2 - ARCified
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple
Inc. ("Apple") in consideration of your agreement to the following
terms, and your use, installation, modification or redistribution of