Skip to content

Instantly share code, notes, and snippets.

Avatar
🔭

Jeff R jeff-r-koyaltech

🔭
View GitHub Profile
@jeff-r-koyaltech
jeff-r-koyaltech / gen-firebase-rewrites.js
Last active Sep 26, 2022
Next.js and Firebase - dynamic / "slug" routing generation script
View gen-firebase-rewrites.js
/* Purpose
Firebase needs certain rewrite rules in place, in order to function properly with
Next.js' static routing. This only applies to statically generated Next.js
projects (i.e. built by 'next build' 'next export')
Inspired by the discussion at:
https://github.com/firebase/firebase-js-sdk/discussions/4980
*/
@jeff-r-koyaltech
jeff-r-koyaltech / tlsChallengeCheck.sh
Last active Jan 27, 2022
Bash command for checking if the recent TLS-ALPN-01 affects you (Jan 26 2022)
View tlsChallengeCheck.sh
# See this URL for more details 🚨
# https://traefik.io/blog/how-to-force-update-lets-encrypt-certificates/?utm_campaign=Let%27s%20Encrypt%20Issue&utm_medium=email&_hsmi=202062799&_hsenc=p2ANqtz-84m7OPEeg9o4xkToQefSLny16r8DkAl9NHEdv7C4z91iNvLF9rRqqKTD1DbTr-cCSGvx4QO9oNzdG0w7WHd0s-adhSoLZ4e1PsO8jcvT0WMOEPpSU&utm_content=202062799&utm_source=hs_email
# if there is no output, you are probably good to go 👍
kubectl get pod --all-namespaces -l app.kubernetes.io/name=traefik -o wide | grep traefik \
| awk '{ print $1, $2 }' | xargs -n2 bash -c 'kubectl describe -n $0 pod $1' \
| grep tlsChallenge
View gist:f218ed06f4359c42ddb5ad40eb3f3798
### Keybase proof
I hereby claim:
* I am jeff-r-koyaltech on github.
* I am kubectl_apply (https://keybase.io/kubectl_apply) on keybase.
* I have a public key ASBYqmJeWa5M4j1KqUhbWoLRxVVIlwvrOz_YQ0sRT-HOFgo
To claim this, I am signing this object:
View stripe-customers.js
// example:
// curl -X POST -H 'Content-Type: application/json' http://localhost:4000/stripe/customers/byCard \
// --data '{ "email": "user@host.com", "last4": "4242", "exp_month": 4, "exp_year":"22" }' | jq
const util = require('util')
let stripe_key = process.env.STRIPE_SK
let stripe = require('stripe')(stripe_key)
@jeff-r-koyaltech
jeff-r-koyaltech / Package.appxmanifest
Created Aug 16, 2015
Full appxmanifest for TextSecure-UWP
View Package.appxmanifest
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest" xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10" IgnorableNamespaces="uap mp">
<Identity Version="0.5.0.0" Name="39705SimonDieterle.TextSecure" Publisher="CN=D7D38CBF-3113-497A-88DB-52B717888A39" />
<mp:PhoneIdentity PhoneProductId="baaa3ed2-1f3a-4a86-91aa-b9c7c296e913" PhonePublisherId="043dd04d-998e-43b5-9450-82637d90e0a8" />
<Properties>
<DisplayName>TextSecure</DisplayName>
<PublisherDisplayName>Simon Dieterle</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Dependencies>
@jeff-r-koyaltech
jeff-r-koyaltech / Package.appxmanifest
Created Aug 13, 2015
How to register curve25519 in a Universal Windows app
View Package.appxmanifest
<Package ...>
<!-- ... blah blah blah ... -->
<Extensions>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>curve25519.dll</Path>
<ActivatableClass ActivatableClassId="curve25519.Curve25519Native" ThreadingModel="both" />
</InProcessServer>
</Extension>
</Extensions>
@jeff-r-koyaltech
jeff-r-koyaltech / gist:8df783df5a0c8368d8ed
Created Aug 1, 2015
Troubleshooting NuGet in Visual Studio 2015 RTM
View gist:8df783df5a0c8368d8ed
PM> Install-Package Google.ProtocolBuffers
Install-Package : Unable to find package 'Google.ProtocolBuffers'
At line:1 char:1
+ Install-Package Google.ProtocolBuffers
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Install-Package], Exception
+ FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.InstallPackageCommand
PM> Get-Package -ListAvailable