Skip to content

Instantly share code, notes, and snippets.

@SLaks
SLaks / Console script.js
Last active July 12, 2021 23:09
Export services from Castlight
copy(await (async () => {
var lastId = localStorage.SLaks___lastExportedId || /* Paste the last ID from the spreadsheet here: */ "";
function takeWhile(cb) {
let found = false;
return x => {
if (found) return false;
if (cb(x)) return true;
found = true;
return true;
}
@SLaks
SLaks / Importer.cs
Created August 2, 2021 20:13
ShulCloud Import Script
// Run this in LINQPad, and add a reference to my https://github.com/ShomreiTorah/Libraries/tree/master/ShomreiTorah.Common
const string domain = "<TODO: insert domain here>";
static readonly Regex parseId = new Regex(@"action=edit_addresses&id=(\d+)");
static readonly Regex findSccsrf = new Regex(@"<input type=""hidden"" name=""sccsrf"" value=""(\w+)""/>");
bool dryRun = false;
async Task Main() {
var cookies = new CookieContainer();