Skip to content

Instantly share code, notes, and snippets.

View openpanzer-save.json
{"scenario":{"name":"Oran","maxTurns":14,"date":"1942-11-13T21:00:00.000Z","atmosferic":0,"latitude":0,"ground":0,"turnsPerDay":0,"dayTurn":0,"reinforcements":{"3":[],"4":[{"row":27,"col":25,"unit":{"eqid":53,"id":-1,"owner":1,"hasMoved":false,"hasFired":false,"hasResupplied":false,"hasOverstrength":false,"isMounted":false,"isSurprised":false,"isDeployed":false,"isCore":false,"tempSpotted":false,"strength":6,"facing":7,"flag":7,"destroyed":false,"player":null,"transport":null,"carrier":0,"moveLeft":4,"ammo":8,"fuel":41,"hasAnimation":false,"hits":0,"experience":57,"entrenchment":0,"entrenchTicks":0,"leader":-1},"turn":"4","id":1}],"6":[{"row":12,"col":1,"unit":{"eqid":389,"id":-1,"owner":0,"hasMoved":false,"hasFired":false,"hasResupplied":false,"hasOverstrength":false,"isMounted":false,"isSurprised":false,"isDeployed":false,"isCore":false,"tempSpotted":false,"strength":6,"facing":3,"flag":23,"destroyed":false,"player":null,"transport":null,"carrier":0,"moveLeft":15,"ammo":6,"fuel":0,"hasAnimation":false,"hits
@susanBuck
susanBuck / .bashrc
Last active Sep 18, 2019
.bashrc template
View .bashrc
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# ------------------------------------
# ALIASES
# ------------------------------------
# Edit .bashrc
alias bashedit='sudo open -a TextEdit ~/.bashrc'
View @carsuki_ - 15 hours ago | ❤ 0 | 🔁 3381
RT @ow: cURL is used on billions of devices.
It's included in every modern car.
It's integrated into every iPhone.
It's integrated in mil…
View mongodb-cheatsheet.md

Working with MongoDB - A Cheatsheet


Getting into the MongoDB SHELL

  1. Fire up MongoDB (or check that it's running)

MacOS: brew services status mongodb/brew/mongodb-community to check status > OR brew services restart mongodb/brew/mongodb-communit to start/restart

@mem-memov
mem-memov / starman.hs
Created Sep 18, 2019
guess dog or cat
View starman.hs
import System.Random
starman :: Int -> IO ()
starman n = do
let allWords = ["cat", "dog"]
index <- randomRIO(0, (length allWords) - 1)
let word = allWords !! index
turn word ['-' | x <- word] n
turn :: String -> String -> Int -> IO ()
@openpanzer
openpanzer / openpanzer-save.json
Last active Sep 18, 2019
Operation Typhoon - Borodino-8
View openpanzer-save.json
{"scenario":{"name":"Operation Typhoon - Borodino","maxTurns":30,"date":"1941-10-26T06:00:00.000Z","atmosferic":2,"latitude":3,"ground":0,"turnsPerDay":0,"dayTurn":0,"reinforcements":{"8":[{"row":13,"col":9,"unit":{"eqid":115,"id":-1,"owner":0,"hasMoved":false,"hasFired":false,"hasResupplied":false,"hasOverstrength":false,"isMounted":false,"isSurprised":false,"isDeployed":false,"isCore":false,"tempSpotted":false,"strength":7,"facing":4,"flag":8,"destroyed":false,"player":null,"transport":{"eqid":156,"ammo":7,"fuel":55,"icon":"resources/units/images/pa171.png"},"carrier":0,"moveLeft":3,"ammo":6,"fuel":0,"hasAnimation":false,"hits":0,"experience":250,"entrenchment":1,"entrenchTicks":0,"leader":-1},"turn":"8","id":1},{"row":14,"col":7,"unit":{"eqid":101,"id":-1,"owner":0,"hasMoved":false,"hasFired":false,"hasResupplied":false,"hasOverstrength":false,"isMounted":false,"isSurprised":false,"isDeployed":false,"isCore":false,"tempSpotted":false,"strength":3,"facing":4,"flag":8,"destroyed":false,"player":null,"transpo
View openpanzer-save.json
{"scenario":{"name":"Kishinev","maxTurns":24,"date":"1941-07-12T21:00:00.000Z","atmosferic":0,"latitude":3,"ground":0,"turnsPerDay":2,"dayTurn":0,"reinforcements":{},"map":{"rows":39,"cols":44,"isLastRowPartial":false,"isLastColPartial":false,"map":[[{"unit":null,"airunit":null,"terrain":0,"road":8,"owner":-1,"flag":-1,"isDeployment":-1,"victorySide":-1,"name":"","isMoveSel":false,"isAttackSel":false},{"unit":null,"airunit":null,"terrain":10,"road":136,"owner":-1,"flag":-1,"isDeployment":-1,"victorySide":-1,"name":"Prut River","isMoveSel":false,"isAttackSel":false},{"unit":null,"airunit":null,"terrain":15,"road":0,"owner":-1,"flag":-1,"isDeployment":-1,"victorySide":-1,"name":"Prut River","isMoveSel":false,"isAttackSel":false},{"unit":null,"airunit":null,"terrain":1,"road":58,"owner":-1,"flag":-1,"isDeployment":-1,"victorySide":-1,"name":"Ungheni","isMoveSel":false,"isAttackSel":false},{"unit":null,"airunit":null,"terrain":1,"road":48,"owner":-1,"flag":-1,"isDeployment":-1,"victorySide":-1,"name":"Ungheni","i
View patch-edid.rb
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten
@jbmilgrom
jbmilgrom / rationalNumbers.immutable.ts
Last active Sep 18, 2019
"sameness" in the context of immutability
View rationalNumbers.immutable.ts
type RationalNumber = readonly [number /* numerator */, number /* denominator */];
// turn into decimal form before comparing in order to reduce fraction
const isEqual = (a: RationalNumber, b: RationalNumber) => (a[0] / a[1]) === (b[0] / b[1]);
const r1 = [2, 3] as const;
const r2 = [2, 3] as const;
const r3 = [2, 5] as const;
isEqual(r1, r2); // => true
@artificer
artificer / SketchSystems.spec
Last active Sep 18, 2019
Health Lottery App Logic
View SketchSystems.spec
Health Lottery App Logic
Is User Logged In?
yes -> Logged In Flow
no -> Logged Out Flow
Logged Out Flow
Play Logged Out*
tap Scan Paper Ticket -> Scan to Wallet
Results Logged Out
You can’t perform that action at this time.