If you have to extend an existing object with additional property, always prefer Vue.set()
over Object.assign()
(or spread operator).
Example below explains implications for different implementations.
// I'm tired of extensions that automatically: | |
// - show welcome pages / walkthroughs | |
// - show release notes | |
// - send telemetry | |
// - recommend things | |
// | |
// This disables all of that stuff. | |
// If you have more config, leave a comment so I can add it!! | |
{ |
// | |
// Notify.swift | |
// | |
import Foundation | |
class Notify { | |
static let shared = Notify() | |
func send(event: NSNotification.Name) { |
/** | |
* MacEditorTextView | |
* Copyright (c) Thiago Holanda 2020-2021 | |
* https://twitter.com/tholanda | |
* | |
* MIT license | |
* Modified by https://github.com/cjwcommuny for TextKit 2 | |
*/ | |
import Combine |
shader_type canvas_item; | |
uniform bool apply = true; | |
uniform float amount = 1.0; | |
uniform sampler2D offset_texture : hint_white; | |
void fragment() { | |
vec4 texture_color = texture(TEXTURE, UV); | |
vec4 color = texture_color; | |
package main | |
import ( | |
"time" | |
"fmt" | |
"net/http" | |
"github.com/gorilla/mux" | |
) | |
func main() { |
import Cocoa | |
open class ScrollingTextView: NSView { | |
// MARK: - Open variables | |
/// Text to scroll | |
open var text: NSString? | |
/// Font for scrolling text | |
open var font: NSFont? |
fetch( | |
"https://outlineapi.com/v3/parse_article?source_url=" + | |
encodeURIComponent(window.location) | |
) | |
.then(res => res.json()) | |
.then(body => { | |
if (body.error) { | |
return alert(`Outline Bookmarklet Error: ${body.error}`); | |
} | |
window.location.href = `https://outline.com/${body.data.short_code}` |
require 'mickkay.wol.Spell' | |
tetris = {} | |
tetris.delay = 10 | |
tetris.origin = Vec3(453985, 80, -888253) | |
tetris.width = 10 | |
tetris.height = 20 | |
tetris.rotationCenter = Vec3(0,-1,0) | |
local upperCenter = tetris.origin + Vec3(tetris.width//2 + 1, tetris.height-1, 0) |