Skip to content

Instantly share code, notes, and snippets.

View instagrim-dev's full-sized avatar

Jonathan Maye-Hobbs instagrim-dev

  • .local
View GitHub Profile
@instagrim-dev
instagrim-dev / xxtea.py
Created December 8, 2019 21:55 — forked from syndrill/xxtea.py
cocos2d-x implementation of XXTEA
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import struct
_DELTA = 0x9E3779B9
def _long2str(v, w):
n = (len(v) - 1) << 2
if w:
@instagrim-dev
instagrim-dev / .gitconfig
Created January 10, 2020 19:47 — forked from johnpolacek/.gitconfig
My current .gitconfig aliases
[alias]
co = checkout
cob = checkout -b
coo = !git fetch && git checkout
br = branch
brd = branch -d
brD = branch -D
merged = branch --merged
st = status
aa = add -A .
@instagrim-dev
instagrim-dev / README.md
Created September 26, 2022 16:07 — forked from darvin/README.md
Travis CI + iOS code signing

Build ios app for iphoneos sdk with signing using Travis ci.

  1. Export your private key that you are going to use for signing from Keychain Access app to ~/privateKey.p12 with export password __YourRandomPass22
  2. Fetch script and run it from your Travis-enabled target iOS app repo: IOS_IDENTITY_KEY=~/privateKey.p12 IOS_IDENTITY_KEY_PASSWORD=__YourRandomPass22 bash <(curl -s https://gist.githubusercontent.com/darvin/96a3af399d0b970a59b1/raw/setup_travis_ios_signing.sh)
  3. Review changes and commit. It suppose to work now.
@instagrim-dev
instagrim-dev / CMakeLists.txt
Created January 18, 2023 23:32 — forked from kwk/CMakeLists.txt
Fix for "undefined reference to dlopen" in CMake projects
project(testlink)
add_executable(testlink main.cpp)
target_link_libraries(testlink)
@instagrim-dev
instagrim-dev / CMakeLists.txt
Created January 18, 2023 23:32 — forked from kwk/CMakeLists.txt
Fix for "undefined reference to dlopen" in CMake projects
project(testlink)
add_executable(testlink main.cpp)
target_link_libraries(testlink)
@instagrim-dev
instagrim-dev / how-to-generate-and-use-private-keys-with-openssl-tool.md
Created January 23, 2023 04:41 — forked from briansmith/how-to-generate-and-use-private-keys-with-openssl-tool.md
How to generate & use private keys using the OpenSSL command line tool

How to Generate & Use Private Keys using OpenSSL's Command Line Tool

These commands generate and use private keys in unencrypted binary (not Base64 “PEM”) PKCS#8 format. The PKCS#8 format is used here because it is the most interoperable format when dealing with software that isn't based on OpenSSL.

OpenSSL has a variety of commands that can be used to operate on private key files, some of which are specific to RSA (e.g. openssl rsa and openssl genrsa) or which have other limitations. Here we always use

@instagrim-dev
instagrim-dev / console.save.js
Created April 8, 2023 04:24 — forked from raecoo/console.save.js
Save JSON object to file in Chrome Devtool
// e.g. console.save({hello: 'world'})
(function(console){
console.save = function(data, filename){
if(!data) {
console.error('Console.save: No data')
return;
}
if(!filename) filename = 'console.json'
if(typeof data === "object"){
data = JSON.stringify(data, undefined, 4)
@instagrim-dev
instagrim-dev / gist:20342f458137238cdde53c1cd629a334
Created April 16, 2023 14:19 — forked from jvenator/gist:9672772a631c117da151
PDFtk Server Install Workaround for Mac OS X

Installing PDFtk Server edittion on your Mac

This workaround install is necessary because PDFtk was pulled from homebrew-cask due to issues with it aggressively overwriting file permissions that could impact other installed libraries. See this homebrew-cask issue.
The following steps worked on Mac OS X 10.10.1 with a standard brew installation for the PDFtk Mac OS X server libary version 2.02.
All Terminal commands separated by a full line space. Some commands wrap into multiple lines.

Download and extract the Mac OS X server install pacakge

@instagrim-dev
instagrim-dev / ifttt_hello_world.py
Created April 21, 2023 20:50 — forked from artrybalko/ifttt_hello_world.py
ifttt_hello_world.py
from fastapi import FastAPI, status, Request
from fastapi.responses import JSONResponse
from pydantic import BaseModel
from typing import Optional
from datetime import datetime, timezone
import uuid
app = FastAPI()
@instagrim-dev
instagrim-dev / example.tf
Created April 28, 2023 19:07 — forked from chancez/example.tf
Support creating a DNS validated ACM certificate containing SANs for multiple different hosted zones
module "combined_acm_certificate" {
source = "../../modules/acm_certificate_dns_validated_multi_zone"
domain_name = "infra.example.com"
zone_to_san = {
"infra.example.com" = [
"*.infra.example.com",
"*.dev.infra.example.com",
"*.staging.infra.example.com",
"*.production.infra.example.com",