Inspired from: https://www.maketecheasier.com/create-blank-text-file-mac/
-
Launch
Automator.app
-
In the menubar click
File
>New
> SelectApplication
then clickChoose
-
In the left pane search for the item
Run AppleScript
Inspired from: https://www.maketecheasier.com/create-blank-text-file-mac/
Launch Automator.app
In the menubar click File
> New
> Select Application
then click Choose
In the left pane search for the item Run AppleScript
Inspired from: https://www.reddit.com/r/apple/comments/3cbbor/tip_remove_author_data_from_pdf/
Launch Automator.app
In the menubar click File
> New
> Select Workflow
then click Choose
In the left pane search for the item Get Selected Finder Items
import Ember from 'ember'; | |
// Ember 1.10 | |
// Order also respected on Ember v3.16.10 | |
export default Ember.Route.extend({ | |
//---fire in order on route enter--- |
// when T is any|unknown, Y is returned, otherwise N | |
type IsAnyUnknown<T, Y, N> = unknown extends T ? Y : N; | |
// when T is never, Y is returned, otherwise N | |
type IsNever<T, Y = true, N = false> = [T] extends [never] ? Y : N; | |
// when T is a tuple, Y is returned, otherwise N | |
// valid tuples = [string], [string, boolean], | |
// invalid tuples = [], string[], (string | number)[] |
import type EmberApp from '@ember/application'; | |
import type { A as EmberArray } from '@ember/array'; | |
import type { Registry as ControllerRegistry } from '@ember/controller'; | |
import type { RouteModel } from '@ember/routing/router-service'; | |
// --- Glimmer Components | |
interface IGlimmerConstructorOwner extends EmberApp {} |
import Controller from '@ember/controller'; | |
import { action } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
prop = 'the prop'; | |
@action | |
withAction() { | |
// `@action` binds `this` to the method | |
alert(this.prop) |
import Controller from '@ember/controller'; | |
import { tracked } from '@glimmer/tracking'; | |
import { action } from '@ember/object'; | |
export default class ApplicationController extends Controller { | |
@tracked numberItems = 1; | |
get myItems() { | |
return [ 1, 2, 3, 4 ] | |
} |
// In TS, interfaces are "open" and can be extended | |
interface Date { | |
/** | |
* Give a more precise return type to the method `toISOString()`: | |
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString | |
*/ | |
toISOString(): TDateISO; | |
} | |
type TYear = `${number}${number}${number}${number}`; |
const controller = new AbortController(); | |
const signal = controller.signal; | |
let RESOLVED_P; | |
function doSomethingAsync(pIndex, pDelay) { | |
if (signal.aborted) { | |
return Promise.reject(new DOMException('Aborted', 'AbortError')); | |
} | |
return new Promise((resolve, reject) => { |