Skip to content

Instantly share code, notes, and snippets.

View untrusted-lvl5-solution.js
/******************
* minesweeper.js *
******************
*
* So much for Asimov's Laws. They're actually trying to kill
* you now. Not to be alarmist, but the floor is littered
* with mines. Rushing for the exit blindly may be unwise.
* I need you alive, after all.
*
* If only there was some way you could track the positions
View untrusted-lvl1-solution.js
/*****************
* cellBlockA.js *
*****************
*
* Good morning, Dr. Eval.
*
* It wasn't easy, but I've managed to get your computer down
* to you. This system might be unfamiliar, but the underlying
* code is still JavaScript. Just like we predicted.
*
@luizsdf
luizsdf / profile
Created Dec 7, 2022
My shell profile
View profile
#!/bin/sh
export PS1='$ '
export EDITOR='vi'
alias la='ls -lAh'
alias less='less -R'
alias curl='curl -fsSL'
alias mp3='yt-dlp --no-playlist --format=bestaudio --extract-audio --audio-format=mp3 --audio-quality=0 --output="%(title)s.%(ext)s"'
alias album='yt-dlp --quiet --format=bestaudio --extract-audio --audio-format=mp3 --audio-quality=0 --output="%(playlist)s/%(playlist_index)s - %(title)s.%(ext)s"'
@livecode-bot
livecode-bot / anyo
Created Dec 7, 2022
io.livecode.ch/learn/webyrd/webmk
View anyo
(define anyo
(lambda (g)
(conde
(g)
((anyo g)))))
@luizsdf
luizsdf / lua-5.1.6.patch
Created Dec 7, 2022
Unofficial update of Lua 5.1
View lua-5.1.6.patch
--- lua-5.1.5/src/Makefile
+++ lua-5.1.6/src/Makefile
@@ -48,7 +48,7 @@
a: $(ALL_A)
$(LUA_A): $(CORE_O) $(LIB_O)
- $(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
+ $(AR) $@ $(CORE_O) $(LIB_O)
$(RANLIB) $@
View duplicate-fields-via-agg
rs0:PRIMARY> db.mm.insert({ "_id" : 2, "item" : "ABC3", dimensions: [ [ "l", 25 ], [ "l", "cm" ], [ "l", 50 ] ] })
WriteResult({ "nInserted" : 1 })
rs0:PRIMARY> db.mm.aggregate([ { $project: { item: 1, dimensions: { $arrayToObject: "$dimensions" } } }, { $merge: {into: "dd"} } ])
rs0:PRIMARY> db.mm.find()
{ "_id" : 2, "item" : "ABC3", "dimensions" : [ [ "l", 25 ], [ "l", "cm" ], [ "l", 50 ] ] }
rs0:PRIMARY> db.dd.find()
{ "_id" : 2, "dimensions" : { "l" : 50 }, "item" : "ABC3" }
View AndesMoneyAmountAccesibilityManager.swift
import Foundation
class AndesMoneyAmountDiscountAccesibilityManager: AndesAccessibilityManager {
private weak var view: AndesMoneyAmountDiscount!
required init(view: UIView) {
guard let accessibleView = view as? AndesMoneyAmountDiscount else {
fatalError("AndesMoneyAmountDiscount AccessibilityManager should recieve an AndesMoneyAmountDiscount")
}
self.view = accessibleView
@GLMeece
GLMeece / unicode_for_kbd_symbols.md
Created Dec 7, 2022
Unicode for Keyboard Symbols
View unicode_for_kbd_symbols.md

Unicode for Keyboard Symbols

  • ⎋ (escape): U+238B
  • ⇥ (tab): U+21E5
  • ⇪ (caps lock): U+21EA
  • ⇧ (shift): U+21E7
  • ⌃ (control): U+2303
  • ⌥ (option): U+2325
  •  (Apple): U+F8FF (in some Apple-provided fonts only)
  • ⌘ (command): U+2318
@crates
crates / isPrime.js
Created Dec 7, 2022
Check to see if a number is prime (generated with some help from ChatGPT)
View isPrime.js
// Create an object to store the results of previous calculations
const primeCache = {
2: true,
3: true,
5: true,
7: true,
11: true,
13: true,
17: true,
19: true,
View settings.json
{
"profiles":
{
"defaults":
{
"colorScheme": "xcad",
"elevate": true,
"cursorShape": "filledBox",
"font":
{