This file contains hidden or 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
| // Fill localStorage to capacity using a single key for easy cleanup | |
| const TEST_KEY = '__fill_test'; | |
| let currentData = ''; | |
| let chunkSize = 1024 * 1024; // Start with 1MB chunks | |
| let totalSize = 0; | |
| let iterations = 0; | |
| console.log('Starting to fill localStorage...'); | |
| console.log(`Using key: ${TEST_KEY}`); |
This file contains hidden or 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
| let entries = []; | |
| let totalSize = 0; | |
| // Collect all localStorage entries with their sizes | |
| for (let key in localStorage) { | |
| if (localStorage.hasOwnProperty(key)) { | |
| let keySize = new Blob([key]).size; // Size of the key | |
| let valueSize = new Blob([localStorage[key]]).size; // Size of the value | |
| let totalEntrySize = keySize + valueSize; | |
| totalSize += totalEntrySize; |
This file contains hidden or 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
| name: Build and Deploy for WebGL ItchIo | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - deploy | |
| jobs: | |
| buildWebGL: |
This file contains hidden or 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
| # .github/workflows/build_and_deploy_to_itch.yml | |
| name: Build and Deploy for WebGL ItchIo | |
| on: | |
| workflow_dispatch: {} | |
| push: | |
| branches: | |
| - deploy | |
| jobs: |
This file contains hidden or 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
| {:paths ["bb"] | |
| :tasks | |
| {:requires ([moon-phases]) | |
| post-moon-phase | |
| (moon-phases/fetch-and-post-moon-phase | |
| {:rapid-api/key (System/getenv "RAPIDAPI_KEY") | |
| :discord/webhook-url (or (first *command-line-args*) | |
| (System/getenv "DISCORD_WEBHOOK_URL"))})}} |
This file contains hidden or 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
| class GroupFilter: | |
| """ | |
| The work here is largely cherry-picked from this unmerged django-filters PR: | |
| https://github.com/carltongibson/django-filter/pull/1167/files | |
| """ | |
| def __init__(self, filter_names): | |
| self.filter_names = filter_names | |
| def set_parent(self, parent): |
This file contains hidden or 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
| ;;; ~/dotfiles/emacs/.doom.d/+css-classes-backend.el -*- lexical-binding: t; -*- | |
| (require 'cl-lib) | |
| (require 's) | |
| (defmacro comment (&rest _) | |
| "Comment out one or more s-expressions." | |
| nil) | |
| ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
This file contains hidden or 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
| main :: IO () | |
| main = do | |
| print "Running 'viewExamples'" | |
| viewExamples | |
| print "Running 'composedViewExamples'" | |
| composedViewExamples | |
| print "Running 'previewExamples'" | |
| previewExamples |
This file contains hidden or 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
| hasn'tExample :: IO () | |
| hasn'tExample = do | |
| let bob = User (UserName "bob") 42 Nothing HM.empty | |
| print "Hasn't bob gold in his inventory?" | |
| print $ hasn't (inventory . ix "gold") bob | |
| -- True | |
| -- As in, "Yes, he doesn't." |
This file contains hidden or 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
| hasGotchaIx :: IO () | |
| hasGotchaIx = do | |
| let bob = User (UserName "bob") 42 Nothing HM.empty | |
| print "Has bob gold in his inventory?" | |
| print $ has (inventory . ix "gold") bob | |
| -- False | |
| let richBob = User (UserName "bob") 42 Nothing | |
| $ HM.fromList [("gold", Item 10 10)] | |
| print "Has bob gold in his inventory?" |
NewerOlder