@HostBinding('attr.id')
externalId = '';
@Input()
set id(value: string) {
this.#id = value;
this.externalId = null;
}
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 * as React from 'react' | |
import hash from 'fnv1a' | |
export const IconCache = React.createContext({}) | |
IconCache.displayName = 'IconCache' | |
export const useIconCache = () => React.useContext(IconCache) | |
const withIcon = (icon) => { | |
const Icon = (props) => { | |
const { size = 24, color = 'currentColor', ...propsWeDontControl } = props | |
const cache = useIconCache() |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Document</title> | |
</head> |
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
function watermark | |
for file in $argv | |
convert $file -font Arial -pointsize 20 -draw "gravity south fill black text 0,12 '$file' fill white text 1,11 '$file' " converted-$file | |
end | |
end |
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
<?php | |
namespace App\Http\Livewire; | |
use Livewire\Component; | |
class Counter extends Component | |
{ | |
public $count = 0; |
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
function run(argv) { | |
var app = Application('Things3') | |
var currentApp = Application.currentApplication() | |
currentApp.includeStandardAdditions = true | |
var selected = app.selectedToDos() | |
if (selected.length !== 0) { | |
selected.forEach(todo => { | |
todo.completionDate = new Date() |
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
on run | |
tell application "Things3" | |
repeat with todo in selected to dos | |
set completion date of todo to (current date) | |
set theNotes to notes of todo | |
repeat with todoParagraph in paragraphs of theNotes | |
if todoParagraph contains "://" then | |
do shell script "open " & quoted form of todoParagraph | |
end if |
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
const Things = require('things-json').default | |
const showList = list => `things:///show?id=${list}` | |
const project = Things.project({ | |
title: 'Weekly Review', | |
}) | |
const todos = [ | |
Things.todo({ title: 'Brain Dump' }), |
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
use AppleScript version "2.4" -- Yosemite (10.10) or later | |
use scripting additions | |
tell application "System Events" | |
click menu item "By Name" of menu "Sort Once" of menu item "Sort Once" of menu "Organize" of menu bar item "Organize" of menu bar 1 of application process "OmniFocus" | |
click menu item "By Status" of menu "Sort Once" of menu item "Sort Once" of menu "Organize" of menu bar item "Organize" of menu bar 1 of application process "OmniFocus" | |
end tell |
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
def even_length?([]), do: true | |
def even_length?([_]), do: false | |
def even_length?([ _, _ | t ]), do: even_length?(t) |