Skip to content

Instantly share code, notes, and snippets.

View Bradshaw's full-sized avatar
🚀
Lost in space

Gaeel Bradshaw-Rodriguez Bradshaw

🚀
Lost in space
View GitHub Profile
@Bradshaw
Bradshaw / gist:6489560
Last active December 22, 2015 14:59 — forked from hugodes/gist:6489552
-- Files are like functions in lua, except they're only meant to be calles once so you're better off doing what I suggested in my gist
local health = 100 -- This is local to the whole file
-- class wasn't useful
function getHealth()
return health -- This returns the value, so health is closed to the file, but can be "read" with this function
end
--[[
What if you want to pick a random option but you're not sure if that random option will be valid?
Let's do this without shufflin' , yeah?
--]]
local randopick = function(table, func)
local indices = {}
for i = 1, #table do
indices[i] = i
end
@Bradshaw
Bradshaw / parseWebring.js
Last active July 5, 2019 13:55
Example of how to parse XXIIVV webring sites.js file
const request = require('request')
const gatherSiteObjects = () => {
return new Promise((resolve, reject) => {
request('https://webring.xxiivv.com/data/sites.json', (err, _, body) => {
if (!err) {
const siteObjects = JSON.parse(body)
resolve(siteObjects)
} else reject(err)
})
@Bradshaw
Bradshaw / prepare-commit-msg
Last active January 20, 2022 14:16 — forked from jatubio/prepare-commit-msg
prepare-commit-msg git hook to add branch name to commit message
#!/bin/sh
#
# An example hook script to prepare the commit log message.
# Called by "git commit" with the name of the file that has the
# commit message, followed by the description of the commit
# message's source. The hook's purpose is to edit the commit
# message file. If the hook fails with a non-zero status,
# the commit is aborted.
#
# To enable this hook, put this inside `.git/hooks/prepare-commit-msg`
@Bradshaw
Bradshaw / how-to-notarize-unity-for-macos.md
Created September 6, 2021 07:44 — forked from dpid/how-to-notarize-unity-for-macos.md
How to notarize a Unity build for MacOs 10.15 Catalina

How to notarize a Unity build for macOs 10.15 Catalina

As of January 2020, all apps running on macOs 10.15 Catalina are required to be notarized. For Unity games distributed outside the Mac App Store, such as with Steam, the notarization process is done post build using a series of Xcode command line tools.

Prerequisites

  • a Mac that is compatible with macOs 10.15 Catalina :
    • MacBook (2015 or newer)
    • MacBook Air (2012 or newer)
  • MacBook Pro (2012 or newer)