Skip to content

Instantly share code, notes, and snippets.

On vacation

Joseph An josephan

On vacation
View GitHub Profile
dpid /
Last active Aug 14, 2022
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.


  • a Mac that is compatible with macOs 10.15 Catalina :
    • MacBook (2015 or newer)
    • MacBook Air (2012 or newer)
  • MacBook Pro (2012 or newer)
View SelectGameObjectsWithMissingScripts.cs
using UnityEngine;
using UnityEditor;
using System.Collections.Generic;
using UnityEngine.SceneManagement; //3
public class SelectGameObjectsWithMissingScripts : Editor
[MenuItem("Tools/WPAG Utilities/Select GameObjects With Missing Scripts")]
static void SelectGameObjects()
josephan /
Last active Dec 16, 2021
Add Tailwind CSS to an Elixir/Phoenix Project with PurgeCSS
josephan /
Last active Oct 29, 2018
How To Add React To Phoenix 1.4

1. cd into assets/ and install the following NPM packages:

npm i react react-dom -S
npm i @babel/preset-react -D

2. add the following line to assets/.babelrc file:

    "presets": [
chrismccord /
Last active Jan 6, 2022
Phoenix 1.3.x to 1.4.0 Upgrade Guides

Phoenix 1.4 ships with exciting new features, most notably with HTTP2 support, improved development experience with faster compile times, new error pages, and local SSL certificate generation. Additionally, our channel layer internals receiveced an overhaul, provided better structure and extensibility. We also shipped a new and improved Presence javascript API, as well as Elixir formatter integration for our routing and test DSLs.

This release requires few user-facing changes and should be a fast upgrade for those on Phoenix 1.3.x.

Install the new project generator

The mix archive can now be installed via hex, for a simpler, versioned installation experience.

To grab the new archive, simply run:

ghostbear / Spotify - How to reduce and limit the cache size (Windows - Mac).md
Last active Sep 28, 2022
[Spotify] How to limit the cache size (Windows/Mac OS)
View Spotify - How to reduce and limit the cache size (Windows - Mac).md

Credit to MadHatter


Use your text editor of choice or if you don't have one use Windows Notepad
Opening with Notepad may or may not result in a fancy mess

  1. Close Spotify
  2. Open File Explorer and paste the following into the address bar %appdata%/Spotify¤
  3. Open the file named prefs with your text editor
  4. Change the numeric value following storage.size= . If storage.size= doesn't exist add it manually to the end of the file and assign numeric value. This value represents megabytes. One gigabyte equals 1024 megabytes. In the end, it should look something like this storage.size=1024
  5. Save the file
fbn4sc / command.txt
Created Jan 29, 2018
Delete all branches except master and develop.
View command.txt
git branch | grep -v "master\|develop" | xargs git branch -D
coryodaniel / heroku_name_generator.ex
Created Dec 16, 2017
Heroku Style Name Generator in Elixir
View heroku_name_generator.ex
defmodule Name do
@adjectives ~w(
autumn hidden bitter misty silent empty dry dark summer
icy delicate quiet white cool spring winter patient
twilight dawn crimson wispy weathered blue billowing
broken cold damp falling frosty green long late lingering
bold little morning muddy old red rough still small
sparkling throbbing shy wandering withered wild black
young holy solitary fragrant aged snowy proud floral
restless divine polished ancient purple lively nameless
danisfermi /
Created Dec 15, 2017
Setup gdb on Mac OS Sierra/High Sierra

Here are the steps to installing and setting up GDB on Mac OS Sierra/High Sierra. Run brew install gdb. On starting gdb, you will get the following error:

Unable to find Mach task port for process-id 2133: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))

To fix this error, follow the following steps:

josephan /
Last active Nov 2, 2018
Phoenix WebSocket Notes

Phoenix WebSocket Notes

The Websocket protocol allows for ongoing, persistent connections between a client and a server, allowing for real-time two-way communication.

In a Phoenix app, it starts in the endpoint.

defmodule AppWeb.Endpoint do
  use Phoenix.Endpoint, otp_app: :app
  socket "/socket", AppWeb.UserSocket