Skip to content

Instantly share code, notes, and snippets.

@schlosser
schlosser / google-sheets-to-firebase.gs
Last active January 10, 2022 03:42
Copy your Google Sheets spreadsheet to Firebase using this AppScript.
// Installation & Setup
// 1. Create a spreadsheet.
// 2. Under Tools > Script Editor, paste this script
// 3. Under Resources > Libraries, add two library dependencies:
// - OAuth2: 1B7FSrk5Zi6L1rSxxTDgDEUsPzlukDsi4KGuTMorsTQHhGBzBkMun4iDF
// - FirebaseApp: 1hguuh4Zx72XVC1Zldm_vTtcUUKUA6iBUOoGnJUWLfqDWx5WlOJHqYkrt
// 4. Create a Firebase project and initialize the Realtime Database
// 5. Fill in your project details in FIREBASE_IO_URL and SERVICE_ACCOUNT below.
// 6. Under Resources > Cloud Platform Project, add your Firebase project's project number from GCP. You
// can find your project number in the GCP Cloud Console here: https://console.cloud.google.com/home/dashboard?project=_
@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 June 24, 2026 07:05
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 apiKey = '';
var monitorUrl = '';
var originUrl = '';
function monitor() {
// CRUX
var allCrux = callCrux(null, originUrl);
var desktopCrux = callCrux('DESKTOP', originUrl);
var mobileCrux = callCrux('MOBILE', originUrl);
@jonjack
jonjack / add-update-refresh-github-access-token-on-mac.md
Last active May 11, 2026 18:54
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 March 11, 2026 14:30
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 June 7, 2026 00:27
Copying Data from a Google Sheet into Firebase Realtime Database in real time via Apps Script
@CodingDoug
CodingDoug / README.md
Last active June 7, 2026 00:28
Copying data from Firebase Realtime Database to a Google Sheet in real time via Cloud Functions