Skip to content

Instantly share code, notes, and snippets.

View alfonsogoberjr's full-sized avatar

Alfonso Gober alfonsogoberjr

View GitHub Profile
@alfonsogoberjr
alfonsogoberjr / KeyStoreManager.kt
Created July 2, 2020 16:19
KeyStoreManager - a Kotlin class for runtime encryption/decryption of secrets and storage within KeyStore
import android.security.keystore.KeyGenParameterSpec
import android.security.keystore.KeyProperties
import java.io.IOException
import java.security.*
import java.security.cert.CertificateException
import javax.crypto.*
import javax.crypto.spec.GCMParameterSpec
class KeyStoreManager {
private val transformation = "AES/GCM/NoPadding"
@alfonsogoberjr
alfonsogoberjr / handler.js
Last active May 23, 2018 15:14
serverless-geolocation service - handler.js
"use strict";
const util = require("util");
const Cookie = require("cookie");
const Reader = require("mmdb-reader");
const DOMAIN = "yourdomain.com"; # replace this with your domain name
// edgeRedirect solves the Cloudfront website use-case
/*
@alfonsogoberjr
alfonsogoberjr / serverless.yml
Last active May 23, 2018 15:14
serverless-geolocation service - serverless.yml
service: geolocation
custom:
stage: ${opt:stage, self:provider.stage}
provider:
name: aws
runtime: nodejs6.10 # Node 8 is not yet supported by Lambda@Edge, only in normal Lambda
stage: dev
memorySize: 256
Verifying my Blockstack ID is secured with the address 1QASiyWJUqv6Sw7ePNf7Fadz5y15ARK6pq https://explorer.blockstack.org/address/1QASiyWJUqv6Sw7ePNf7Fadz5y15ARK6pq

Keybase proof

I hereby claim:

  • I am alfonsogoberjr on github.
  • I am alfonsogober (https://keybase.io/alfonsogober) on keybase.
  • I have a public key ASBr03l0xa2jEMtYAPahNV5ahFGQ_Wx7F8e8F-8PLjw1XAo

To claim this, I am signing this object:

@alfonsogoberjr
alfonsogoberjr / server.litcoffee
Last active August 29, 2015 14:20
bipio/src/server.litcoffee