git reset --soft, any changes are left as staged (or "ready to commit")git reset --mixed, any changes are left as unstagedgit reset --hard, any changes are discarded
git reset --soft HEAD~3| import pygame, random | |
| W, H = 800, 600 | |
| class Stickman: | |
| def __init__(self): | |
| self.x = random.randint(50, W - 50) | |
| self.hp = 20 | |
| self.level = 1 | |
| self.xp = 0 |
git log --grep="..."
git log --grep=\<pattern> searches in commit messages only| alias la="ls -a" | |
| mkcd() { | |
| mkdir $1 && cd $1 | |
| } |
| const { | |
| chain, | |
| filter, | |
| count, | |
| groupBy, | |
| map | |
| } = require("./chaining") | |
| const transforms = [ |
| public abstract record StronglyTypedId<TValue>(TValue Value) | |
| where TValue : notnull | |
| { | |
| public override sealed string ToString() => $"{Value}"; | |
| } |
| function round(value, precision) { | |
| return Number(Math.round(value + "e" + precision) + "e-" + precision) | |
| } | |
| function strictCompare(left, right) { | |
| console.log(`strictCompare(${left}, ${right})`); | |
| return left === right; | |
| } |
| function Deferred() { | |
| this.resolve = null; | |
| this.reject = null; | |
| this.promise = new Promise((resolve, reject) => { | |
| this.resolve = resolve; | |
| this.reject = reject; | |
| }); | |
| } |
| import { wrapInDisablerProxyFactory } from "./wrapInDebugModeProxy" | |
| describe("Enable/disable functions", () => { | |
| const obj = { | |
| flipTheFlag(target) { | |
| target.flag = true | |
| }, | |
| inner: { | |
| anotherFlipTheFlag(target) { |