$argon2id$v=19$m=512,t=256,p=1$d3XjcqcR4lhyw3L25YD6zg$N8AG7sZMQC8CUvo1nAEwO3tkCedOf0uEpj7nafgiiKQ
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
defmodule UdsBlockExample do | |
def test_socket() do | |
{:ok, socket} = :gen_udp.open(0, [:local, {:active, false}]) | |
for i <- 0..100000 do | |
packet = ["#{i} hello " |> List.duplicate(100), "\n"] | |
:gen_udp.send(socket, {:local, "/tmp/test.sock"}, 0, packet) | |
receive do | |
{:inet_reply, _port, _ref} = msg -> |
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
// If you run this in a playground in Xcode 12, you can see the difference in behavior in the live view. | |
import SwiftUI | |
import PlaygroundSupport | |
class Counter: ObservableObject { | |
@Published var count: Int | |
init(_ initialCount: Int) { | |
self.count = initialCount |
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
import SwiftUI | |
private let linkDetector = try! NSDataDetector(types: NSTextCheckingResult.CheckingType.link.rawValue) | |
struct LinkColoredText: View { | |
enum Component { | |
case text(String) | |
case link(String, URL) | |
} |
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
import Combine | |
import CoreData | |
extension NSManagedObjectContext { | |
func changesPublisher<Object: NSManagedObject>(for fetchRequest: NSFetchRequest<Object>) | |
-> ManagedObjectChangesPublisher<Object> | |
{ | |
ManagedObjectChangesPublisher(fetchRequest: fetchRequest, context: self) | |
} | |
} |
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
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"net" | |
"net/url" | |
"os" | |
"path" |
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
{ | |
"version": "https://jsonfeed.org/version/1", | |
"title": "My Example Feed", | |
"home_page_url": "https://example.org/", | |
"feed_url": "https://example.org/feed.json", | |
"items": [ | |
{ | |
"id": "3", | |
"content_html": "<p>This is a test post with an image:</p><img src=\"https://i.imgur.com/VBnsOdM.jpg\">", | |
"url": "https://example.org/3" |
I hereby claim:
- I am mjm on github.
- I am mmoriarity (https://keybase.io/mmoriarity) on keybase.
- I have a public key ASAUZ6JhJyj8M6SIMQyxH8ZN7Sdj8qGjGMIQbzAnaMZEQAo
To claim this, I am signing this object:
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
var express = require('express'); | |
var app = express(); | |
var router1 = express.Router(); | |
router1.use(function (req, res, next) { | |
console.log('router1 middleware called.'); | |
next(); | |
}); | |
router1.get('/1', function (req, res) { |
NewerOlder