Skip to content

Instantly share code, notes, and snippets.

View catgirlinspace's full-sized avatar
🏳️‍⚧️
happy pride month!!

saige leah catgirlinspace

🏳️‍⚧️
happy pride month!!
View GitHub Profile
@schacon
schacon / gist:1
Created July 15, 2008 18:17
the meaning of gist
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.
@tylerneylon
tylerneylon / json.lua
Last active March 31, 2025 01:08
Pure Lua json library.
--[[ json.lua
A compact pure-Lua JSON library.
The main functions are: json.stringify, json.parse.
## json.stringify:
This expects the following to be true of any tables being encoded:
* They only have string or number keys. Number keys must be represented as
strings in json; this is part of the json spec.
@k3ithos
k3ithos / .travis.yml
Last active March 6, 2021 03:57
A sample travis script to build PocketMine(and its forks) and upload it to a GitHub repository to be accessible by GitHub Pages.
# PROJECT SPECIFICATIONS
language: php
php:
- 7.0
branches:
except:
- "/^*-v[0-9]/"
# WORKSPACE CONFIGURATION
before_script:
@k3ithos
k3ithos / Travis Build for Plugins
Created June 10, 2016 06:40
A Travis build script for plugins that builds them, then uploads them to a GitHub Pages site.
language: php
php:
- 7.0
branches:
only:
# Set the branches you want built here, as shown below in "master"
- master
before_script:
- pecl install channel://pecl.php.net/pthreads-3.1.6
@evaera
evaera / Clean Code.md
Last active May 5, 2025 00:31
Best Practices for Clean Code
  1. Use descriptive and obvious names.
    • Don't use abbreviations, use full English words. player is better than plr.
    • Name things as directly as possible. wasCalled is better than hasBeenCalled. notify is better than doNotification.
    • Name booleans as if they are yes or no questions. isFirstRun is better than firstRun.
    • Name functions using verb forms: increment is better than plusOne. unzip is better than filesFromZip.
    • Name event handlers to express when they run. onClick is better than click.
    • Put statements and expressions in positive form.
      • isFlying instead of isNotFlying. late intead of notOnTime.
      • Lead with positive conditionals. Avoid if not something then ... else ... end.
  • If we only care about the inverse of a variable, turn it into a positive name. missingValue instead of not hasValue.
@Dekkonot
Dekkonot / sha1.lua
Last active October 13, 2023 02:07
Implementation of the SHA-1 hashing algorithm for Roblox
-- I claim no copyright over this source code and you can use it for whatever you want. Just don't sue me.
local ASSERTIONS_ENABLED = true -- Whether to run several checks when the module is first loaded and when a message is preprocessed.
local INIT_0 = 0x67452301
local INIT_1 = 0xEFCDAB89
local INIT_2 = 0x98BADCFE
local INIT_3 = 0x10325476
local INIT_4 = 0xC3D2E1F0
-- Grab some services.
local Lighting = game:GetService("Lighting")
local RunService = game:GetService("RunService")
-- Make sure this is running from a LocalScript.
if not RunService:IsClient() then
error("This should be running in a LocalScript!")
end
-- Create a Sound object for the music.
-- Consider using Thread instead!
-- https://gist.github.com/CloneTrooper1019/538f0ab2541ef98912a2694dd8d274e7
local RunService = game:GetService("RunService")
local threads = {}
RunService.Stepped:Connect(function ()
local now = tick()
local resumePool
@catgirlinspace
catgirlinspace / AveragePlayTime.kql
Last active September 19, 2021 18:11
Roblox PlayFab Data Explorer Quieries
['events.all']
| where FullName_Name == "_Player_Leave"
| where isnotnull(EventData.data.sessionTime) // older _Player_Leave events dont have this
| summarize SessionTime = avg(todouble(EventData.data.sessionTime) * 1s)
@EgoMoose
EgoMoose / ViewportModel.lua
Last active May 1, 2025 02:32
Lua class to calculate camera distance/cframe for fitting models into viewport frames
--[[
MIT License
Copyright (c) 2021 EgoMoose
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
copies of the Software, and to permit persons to whom the Software is