Skip to content

Instantly share code, notes, and snippets.

@yuvalherziger
yuvalherziger / CustomCompleter.js
Last active November 28, 2023 23:53
Sample Ace Editor custom completer
// fetch ace's language tools module:
var langTools = ace.require('ace/ext/language_tools');
// data stub:
var sqlTables = [
{ name: 'users', description: 'Users in the system' },
{ name: 'userGroups', description: 'User groups to which users belong' },
{ name: 'customers', description: 'Customer entries' },
{ name: 'companies', description: 'Legal entities of customers' },
{ name: 'loginLog', description: 'Log entries for user log-ins' },
@thilonel
thilonel / app_store_server_notification_verifier.go
Last active May 14, 2023 18:46
Apple App Store Server Notification JWT Verification
package app_store_server_notification_verifier
import (
"crypto/ecdsa"
"crypto/x509"
"encoding/base64"
"errors"
"io/ioutil"
"github.com/golang-jwt/jwt"
from typing import Any, Dict, List, Optional
from OpenSSL import crypto
import jwt
from jwt.utils import base64url_decode
import requests
import logging
ROOT_CER_URL = "https://www.apple.com/certificateauthority/AppleRootCA-G3.cer"
G6_CER_URL = "https://www.apple.com/certificateauthority/AppleWWDRCAG6.cer"