- Export a QR code from Google Authenticator
- Open the Google Authenticator Android app
- Tap ☰ › Transfer accounts › Export accounts
- Laboriously deselect all accounts except the one you want to export
- Tap Next
- Decode the
otpauth-migrationURI from the QR code- Take a screenshot of the QR code on the screen by holding Power+Volume Down
- Open the screenshot in Google Photos or another app that can decode QR codes
https://github.com/spieglt/cloaker - password-based file encryptor (NOTE: uses Qt)
https://github.com/str4d/rage - file encryption tool and librarary that uses the age format
https://github.com/mohanson/gameboy - gameboy emulator
https://github.com/bartwillems/lyriek - fetch the lyrics of a song playing in an mpris-compatible player
https://github.com/JakeStanger/mpd-discord-rpc - discordrpc for mpd
One thing that always made me a little sad about transducers was how map lost its ability to iterate multiple collections in parallel. This is actually my favorite feature of map. For example:
(map + (range 5) (range 5 10))
=> (5 7 9 11 13)One somewhat practical use of this is if you want to compare two sequences, pairwise, using a comparator. Though I wish that every? took multiple collections, this is an adequate substitute:
| // Not what I'd call good readable code, but it amuses me ;D | |
| private boolean playerWon(char player, char[] board) { | |
| return of( | |
| // rows | |
| of(0, 1, 2), of(3, 4, 5), of(6, 7, 8), | |
| // columns | |
| of(0, 3, 6), of(1, 4, 7), of(2, 5, 8), | |
| // diagonals | |
| of(0, 4, 8),of(2, 4, 6) |
| ;; did you know that binding conveying is not immutable but read-only? (the future sees updates performed by the original thread) | |
| => (with-local-vars [a 1] | |
| (future (Thread/sleep 1000) (prn 'future @a)) | |
| (var-set a 2)) | |
| 2 | |
| future 2 | |
| ;; you have to push new bindings to isolate: | |
| => (with-local-vars [a 1] | |
| (with-bindings {a @a} |
A list of commonly asked questions, design decisions, reasons why Clojure is the way it is as they were answered directly by Rich (even when from many years ago, those answers are pretty much valid today!). Feel free to point friends and colleagues here next time they ask (again). Answers are pasted verbatim (I've made small adjustments for readibility, but never changed a sentence) from mailing lists, articles, chats.
How to use:
- The link in the table of content jumps at the copy of the answer on this page.
- The link on the answer itself points back at the original post.
| // This will open up a prompt for text to send to a console session on digital ocean | |
| // Useful for long passwords | |
| (function () { | |
| var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
| function f() { | |
| var character = t.shift(); | |
| var i=[]; | |
| var code = character.charCodeAt(); | |
| var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
This document is a collection of concepts and strategies to make large Elm projects modular and extensible.
We will start by thinking about the structure of signals in our program. Broadly speaking, your application state should live in one big foldp. You will probably merge a bunch of input signals into a single stream of updates. This sounds a bit crazy at first, but it is in the same ballpark as Om or Facebook's Flux. There are a couple major benefits to having a centralized home for your application state:
- There is a single source of truth. Traditional approaches force you to write a decent amount of custom and error prone code to synchronize state between many different stateful components. (The state of this widget needs to be synced with the application state, which needs to be synced with some other widget, etc.) By placing all of your state in one location, you eliminate an entire class of bugs in which two components get into inconsistent states. We also think yo
| { :+ | |
| { :editor | |
| { "pmeta-/" [:toggle-comment-selection] | |
| "ctrl-shift-up" [:editor.sublime.selectLinesUpward] | |
| "ctrl-shift-down" [:editor.sublime.selectLinesDownward] | |
| "pmeta-d" [:editor.sublime.selectNextOccurrence] | |
| "ctrl-m" [:editor.sublime.goToBracket] | |
| "ctrl-shift-m" [:editor.sublime.selectBetweenBrackets] | |
| "shift-pmeta-space" [:editor.sublime.selectScope] | |
| "ctrl-pmeta-up" [:editor.sublime.swapLineUp] |