Skip to content

Instantly share code, notes, and snippets.

@stravant
stravant / scramble.lua
Created October 30, 2019 00:48
Scramble the object placement in an osu map
--X: 0-512
--Y: 0-384
-- Type bits: (-)(-)(-)(-) (spinner)(NC)(slider)(circle)
-- Circle: x,y,time,type,hitSound,extras
-- Slider: x,y,time,type,hitSound,sliderType|curvePoints,repeat,pixelLength,edgeHitsounds,edgeAdditions,extras
-- type = Linear Perfect Bezier Catmul
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active March 17, 2025 06:52
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {

Fix for FOUC :

At the top of your HTML:

<!doctype html>
<html>
<head>
    <style>html{visibility: hidden;opacity:0;}</style>
var pageSpeedApiKey = '';
var pageSpeedMonitorUrl = '';
function monitor() {
var desktop = callPageSpeed('desktop', pageSpeedMonitorUrl);
var mobile = callPageSpeed('mobile', pageSpeedMonitorUrl);
var desktopVitals = getVitals(desktop);
var mobileVitals = getVitals(mobile);
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active April 27, 2025 02:09
Adding & Updating GitHub Access Token on Mac

Using an Access Token for the first time

Follow the instructions on Github to Create an Access Token in Github

Configure Git to use the osxkeychain

By default, git credentials are not cached so you need to tell Git if you want to avoid having to provide them each time Github requires you to authenticate. On Mac, Git comes with an “osxkeychain” mode, which caches credentials in the secure keychain that’s attached to your system account.

You can tell Git you want to store credentials in the osxkeychain by running the following:-

@gaearon
gaearon / index.html
Last active April 1, 2025 01:48
Add React in One Minute
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@Aerodos12
Aerodos12 / Duty.lua
Created January 14, 2018 21:40 — forked from anonymous/Duty.lua
GunScripts, AI and GameServer
return function()
--[[
Basic Monster by ArceusInator
Information:
Configurations.MaximumDetectionDistance (default 200)
The monster will not detect players past this point. If you set it to a negative number then the monster will be able to chase from any distance.
Configurations.CanGiveUp (default true)
@CodingDoug
CodingDoug / README.md
Last active December 17, 2022 10:23
Copying data from Firebase Realtime Database to a Google Sheet in real time via Cloud Functions
@dreamsparkx
dreamsparkx / More-links.txt
Last active April 4, 2025 09:15
Install Apache, PHP, MySQL and phpMyAdmin on Mac OS X