Skip to content

Instantly share code, notes, and snippets.

@keipes
keipes / scribbles_6_2_0.json
Created December 30, 2023 21:40
Sorrows Scribbles 6.2.0 export JSON
{
"Sidearms": [
{
"name": "G57",
"stats": [
{
"barrelType": "Factory",
"ammoType": "Close Combat",
"dropoffs": [
{
@keipes
keipes / scribbles_export.js
Created December 30, 2023 21:37
Sorrow's Scribbles AppsScript export
function myFunction() {
const ss = SpreadsheetApp.getActiveSpreadsheet();
const sheets = ss.getSheets();
const data = {};
for (let i = 7; i < sheets.length; i++) { //sheets.length
const sheet = sheets[i];
const colorObject = sheet.getTabColorObject();
const tabColorHex = colorObject.asRgbColor().asHexString();
switch (tabColorHex) {
case '#ffffff':
function Update()
target = acquireTarget(800)
if target ~= nil then
fireAt(target)
end
end
function acquireTarget(minDistance)
target = nil
for i = 0, I:GetNumberOfMainframes(), 1 do
@keipes
keipes / primes_faster.go
Created December 6, 2013 18:52
Optimized version of `primes less than n` written in Go
package main
import (
"fmt";
"os";
"strconv";
"log";
"math";
)
@keipes
keipes / primes.go
Created December 5, 2013 23:32
Naive O(n^2) prime factors in Go
package main
import (
"fmt";
"os";
"strconv";
"log";
)
func IsPrime(target int) bool {