Source Here’s my favorite weird trick to debug CSS - General - The freeCodeCamp Forum
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
defmodule EctoMigrationTest do | |
use ExUnit.Case | |
def rollback, do: Mix.Shell.IO.cmd("MIX_ENV=test mix ecto.rollback --all") | |
def migrate, do: Mix.Shell.IO.cmd("MIX_ENV=test mix ecto.migrate") | |
test "test rollback and migration" do | |
assert 0 == rollback() | |
assert 0 == migrate() |
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 pixelBufferPool: CVPixelBufferPool = // ... | |
unsafe_pointer: do { | |
let pixelBufferPointer = UnsafeMutablePointer<CVPixelBuffer?>.allocate(capacity: 1) | |
defer { | |
pixelBufferPointer.deinitialize(count: 1) | |
pixelBufferPointer.deallocate() | |
} | |
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
import Foundation | |
let stmt: NSString = "Actionable emptiness" | |
let options: NSLinguisticTagger.Options = [.omitWhitespace, .omitPunctuation, .omitOther] | |
let stringRange = NSMakeRange(0, stmt.length) | |
let languageMap = ["Latn":["en"]] | |
stmt.enumerateLinguisticTags(in: stringRange, scheme: NSLinguisticTagScheme.lemma, options: options, orthography: nil) { tag, _, _, _ in | |
print(tag?.rawValue) | |
} |
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
// Run any SwiftUI view as a Mac app. | |
import Cocoa | |
import SwiftUI | |
NSApplication.shared.run { | |
VStack { | |
Text("Hello, World") | |
.padding() | |
.background(Capsule().fill(Color.blue)) |
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
// Place your key bindings in this file to overwrite the defaults | |
[{ | |
"key": "shift+ctrl+p", | |
"command": "cursorUpSelect", | |
"when": "editorTextFocus" | |
}, | |
{ | |
"key": "shift+ctrl+f", | |
"command": "cursorRightSelect", | |
"when": "editorTextFocus" |
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
{ | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "mix test all", | |
"type": "shell", | |
"command": "mix", | |
"args": ["test", "--color", "--trace"], | |
"options": { | |
"cwd": "${workspaceRoot}", |
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
git config --global alias.trim '!f() { git branch | grep -v "\*" | xargs -n 1 git branch -D; }; f' |