Skip to content

Instantly share code, notes, and snippets.

@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created October 5, 2024 13:55
Rimworld output log published using HugsLib
Log uploaded on Saturday, October 5, 2024, 9:55:52 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Core(Ludeon.RimWorld): (no assemblies)
Better Log - Fix your errors(bs.betterlog): 0PrepatcherAPI(1.2.0), 1Fishery(0.5.1.2), BetterLog(1.1.0), System.Runtime.CompilerServices.Unsafe(av:6.0.0,fv:6.0.21.52210)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
Anomaly(Ludeon.RimWorld.Anomaly): (no assemblies)
Big and Small - Framework(RedMattis.BetterPrerequisites): BetterPrerequisites(1.0.0), BigAndSmall(1.0.0), BSXeno(1.0.0)
async computeRollingAverage(
accountId: string,
refDate: string,
): Promise<any> {
const totalPort = [];
const data = [];
let mom = 0;
let momC = 0;
// Loop through the past 7 months
@whizzbbig
whizzbbig / revert-a-commit.md
Created October 5, 2024 13:52 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@msulais
msulais / file.ts
Created October 5, 2024 13:52
Open file in Typescript without <input type=file>
async function openFile(
accept: string | null,
multiple: boolean = false,
capture?: string
): Promise<FileList | null> {
return new Promise<FileList | null>((ok) => {
const filePickerRef = document.createElement('input')
filePickerRef.type = 'file'
if (accept != null) filePickerRef.accept = accept
if (capture != null) filePickerRef.capture = capture
@HugsLibRecordKeeper
HugsLibRecordKeeper / output_log.txt
Created October 5, 2024 13:52
Rimworld output log published using HugsLib
Log uploaded on Saturday, October 5, 2024, 9:52:28 PM
Loaded mods:
Harmony(brrainz.harmony)[mv:2.3.1.0]: 0Harmony(2.3.3), HarmonyMod(2.3.1)
Visual Exceptions(brrainz.visualexceptions)[mv:1.3.2.0]: CrossPromotion(1.1.2), VisualExceptions(1.3.2)
Core(Ludeon.RimWorld): (no assemblies)
Royalty(Ludeon.RimWorld.Royalty): (no assemblies)
Ideology(Ludeon.RimWorld.Ideology): (no assemblies)
Biotech(Ludeon.RimWorld.Biotech): (no assemblies)
Anomaly(Ludeon.RimWorld.Anomaly): (no assemblies)
Big and Small - Framework(RedMattis.BetterPrerequisites): BetterPrerequisites(1.0.0), BigAndSmall(1.0.0), BSXeno(1.0.0)
@shereEth
shereEth / group-github-guide.md
Created October 5, 2024 13:51 — forked from Alinaprotsyuk/group-github-guide.md
A basic guide on working with Git as a group.

Using Git As A Group (DevMountain)

Geordyn Ader - Mentor - Dallas, TX Campus

Getting Started - Choose ONE person from your group to take care of the following steps

  1. Go to GitHub and click the + in the top right corner. Click New Organization.
  2. Name your organization (make it relevant).
  3. Add email for ‘billing’; do not worry, it’s free
  4. Choose the Free Plan
@forkyau
forkyau / hourly_rainfall_data-2024-10-05|21-30.csv
Created October 5, 2024 13:51
GIST created by python code
id station stationid value unit obstime date
0 流浮山 RF001 0 mm 2024-10-05T21:30:00+08:00 2024-10-05
1 湿地公园 RF002 0 mm 2024-10-05T21:30:00+08:00 2024-10-05
2 水边围 N12 0 mm 2024-10-05T21:30:00+08:00 2024-10-05
3 石岗 RF003 0 mm 2024-10-05T21:30:00+08:00 2024-10-05
4 大美督 RF004 0 mm 2024-10-05T21:30:00+08:00 2024-10-05
5 大埔墟 RF005 0 mm 2024-10-05T21:30:00+08:00 2024-10-05
6 北潭涌 RF006 0 mm 2024-10-05T21:30:00+08:00 2024-10-05
7 滘西洲 RF007 0 mm 2024-10-05T21:30:00+08:00 2024-10-05
8 西贡 N15 0 mm 2024-10-05T21:30:00+08:00 2024-10-05
Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
- Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from p