This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chokidar = require('chokidar') | |
const fs = require('fs') | |
const winPicsPath = '/c/Users/brenn/Pictures/exports' | |
const picsPath = '/mnt/c/Users/brenn/Pictures/exports' | |
const watchPaths = { | |
exports: `${picsPath}`, | |
} | |
const MB = 1024 * 1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void TP(BasePlayer player, MapNote note) | |
{ | |
player.flyhackPauseTime = 10f; | |
var health = player.health; | |
var health2 = 100 - health; | |
player._health = 100000; | |
var pos = note.worldPosition + new Vector3(0,120,0);; | |
player.Teleport(pos); | |
Message(player, "Teleported", pos); | |
timer.Once(6f, () => { if (player == null) return; Message(player, "Cooldown", (100 - health2)); player.SetMaxHealth(100); player.Hurt(health2); }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"workbench.sideBar.location": "left", | |
"editor.fontFamily": "'DejaVu Sans Mono for Powerline'", | |
"editor.fontSize": 14, | |
"editor.tabSize": 4, | |
"workbench.colorTheme": "Darktooth", | |
"editor.minimap.enabled": false, | |
"window.zoomLevel": 2, | |
"window.openFilesInNewWindow": "off", | |
"workbench.statusBar.visible": true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cargo run | |
Compiling k8s-controller v0.1.0 (/Users/brennan/code/rust/k8s-controller) | |
warning: unused import: `tokio::prelude::*` | |
--> src/main.rs:3:5 | |
| | |
3 | use tokio::prelude::*; | |
| ^^^^^^^^^^^^^^^^^ | |
| | |
= note: `#[warn(unused_imports)]` on by default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const extractIds = pluck('id') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const extractIds = items => items.map(item => item.id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const extractIds = items => { | |
let itemIds = [] | |
for (let i=0; i<items.length; i++) { | |
itemIds.push(items[i].id) | |
} | |
return itemIds | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const useFirestoreCollectionQuery = (path, renderFn) => { | |
const [state, setState] = useState(null) | |
const collection = useRef(useFirestoreCollection(path)) | |
useEffect(() => { | |
console.log('useEffect') | |
return collection.current.onSnapshot(snapshot => { | |
const docs = snapshot.docs.map(x => x.data()) | |
setState(docs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const useFirestoreCollectionQuery = (path, renderFn) => { | |
const [state, setState] = useState(null) | |
const collection = useFirestoreCollection(path) | |
useEffect(() => { | |
console.log('useEffect') | |
return collection.onSnapshot(snapshot => { | |
const docs = snapshot.docs.map(x => x.data()) | |
setState(docs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const useFirestoreCollectionQuery = (path, renderFn) => { | |
const [state, setState] = useState(null) | |
const collection = useFirestoreCollection(path) | |
useEffect(() => { | |
console.log('useEffect') | |
return collection.onSnapshot(snapshot => { | |
const docs = snapshot.docs.map(x => x.data()) | |
setState(docs) |
NewerOlder