Skip to content

Instantly share code, notes, and snippets.

View pillar's full-sized avatar

pillar pillar

  • home
  • Guangzhou, China
View GitHub Profile
@levelsio
levelsio / gist:5bc87fd1b1ffbf4a705047bebd9b4790
Last active September 27, 2025 09:49
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@danielgross
danielgross / ai-plugin.json
Created March 23, 2023 22:59
ChatGPT Plugin for Twilio
{
"schema_version": "v1",
"name_for_model": "twilio",
"name_for_human": "Twilio Plugin",
"description_for_model": "Plugin for integrating the Twilio API to send SMS messages and make phone calls. Use it whenever a user wants to send a text message or make a call using their Twilio account.",
"description_for_human": "Send text messages and make phone calls with Twilio.",
"auth": {
"type": "user_http",
"authorization_type": "basic"
},
@SpikeKing
SpikeKing / Utils.java
Last active October 8, 2021 10:22
Android - 判断是否是模拟器
/**
* 判断是否是模拟器
*
* @return 模拟器
*/
public static boolean isEmulator() {
Log.e("DEBUG-WCL", "Build.FINGERPRINT: " + Build.FINGERPRINT
+ ", Build.MODEL: " + Build.MODEL
+ ", Build.MANUFACTURER: " + Build.MANUFACTURER
+ ", Build.BRAND: " + Build.BRAND
@Skybladev2
Skybladev2 / ExecutionOrderManager.cs
Last active June 29, 2023 11:20
Explicit script exection order for Unity scripts
using System;
using UnityEditor;
[InitializeOnLoad]
public class ExecutionOrderManager : Editor
{
static ExecutionOrderManager()
{
foreach (MonoScript monoScript in MonoImporter.GetAllRuntimeMonoScripts())
{
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class PostEffect : MonoBehaviour
{
public Material mat;
@bogdanrybak
bogdanrybak / DataSerializer.cs
Last active May 18, 2024 13:32
FullSerializer / unity
using FullSerializer;
using System;
using System.IO;
using System.Runtime.Serialization.Formatters.Binary;
public static class DataSerializer
{
private static readonly fsSerializer serializer = new fsSerializer();
public static string Serialize<T>(object value, bool prettify = false)
@DGoodayle
DGoodayle / RadialLayout.cs
Created September 16, 2015 13:48
Radial Layouts in Unity
using UnityEngine;
using UnityEngine.UI;
/*
Radial Layout Group by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk
Copyright (c) 2015
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@stramit
stramit / SpecialEventClass.cs
Last active November 21, 2018 06:36
SpecialEventClass
/*
* When developing the UI system we came across a bunch of things we were not happy
* with with regards to how certain events and calls could be sent in a loosely coupled
* way. We had this requirement because with a UI you tend to implement widgets that receive
* certain events, but you don't really want to have lots of glue code to manage them
* and keep track of them. The eventing interfaces we developed helped with this. One of
* the interesting things, is that they are not justfor the UI system! You can use this as
* a type-safe, fast, and simple alternative to SendMessage (never use SendMessage!).
* So how does it all work?
using UnityEngine;
using System.Collections;
public class Gismo16to9 : MonoBehaviour {
public void OnDrawGizmos()
{
var camSizeHeight = Camera.main.orthographicSize;
var camSizeWidth = camSizeHeight * 16f / 9f;
var leftUp = new Vector2(-camSizeWidth, camSizeHeight);
@rbobbins
rbobbins / protocols.md
Last active June 11, 2024 22:11
Notes from "Protocol-Oriented Programming in Swift"

PS: If you liked this talk or like this concept, let's chat about iOS development at Stitch Fix! #shamelessplug

Protocol-Oriented Programming in Swift

Speaker: David Abrahams. (Tech lead for Swift standard library)

  • "Crusty" is an old-school programmer who doesn't trust IDE's, debuggers, programming fads. He's cynical, grumpy.

  • OOP has been around since the 1970's. It's not actually new.

  • Classes are Awesome

    • Encapsulation
    • Access control