Skip to content

Instantly share code, notes, and snippets.

View orta's full-sized avatar
🥂

Orta Therox orta

🥂
View GitHub Profile
@orta
orta / example.d.ts
Last active December 9, 2021 15:27
html-lang-tester
export type ABC = {
one: 123
}
@orta
orta / tsc-compiler-errors-3.svg
Last active September 6, 2021 10:25
Ideas for TSC with prettier pretty settings - click raw on this svg below
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@orta
orta / gist:7117853
Created October 23, 2013 12:36
HTML -> NSAttributedString using only UIKit
+ (NSAttributedString *)artsyBodyTextAttributedStringFromHTML:(NSString *)HTML withFont:(UIFont *)font
{
NSMutableParagraphStyle *style = [[NSMutableParagraphStyle alloc] init];
style.lineHeightMultiple = 1.2;
style.paragraphSpacing = font.pointSize * .5;
NSDictionary *textParams = @{
NSFontAttributeName : font,
NSParagraphStyleAttributeName : style,
@orta
orta / gist:dd0868bc8cd780f4ac81aaf30e7f8d34
Created May 20, 2021 17:03
index.d.ts file lengths on DT
[229,"collections"
[237,"json3"
[240,"intl"
[242,"ofe"
[245,"rickshaw"
[246,"webcrypto"
[249,"tsc-watch"
[253,"slackdown"
[256,"node-os-utils"
[256,"touch-events"
@orta
orta / highlight.swift
Created April 23, 2016 11:19 — forked from joelcox/highlight.swift
Swift implementation to highlight Cocoa UI elements (http://stackoverflow.com/a/25984748/316803)
// Taken from:
// https://gist.github.com/joelcox/28de2f0cb21ea47bd789
NSColor.selectedMenuItemColor().set()
NSRectFillUsingOperation(dirtyRect, .CompositeSourceOver);
if (dirtyRect.size.height > 1) {
let heightMinus1 = dirtyRect.size.height - 1
let currentControlTint = NSColor.currentControlTint()
let startingOpacity: CGFloat = currentControlTint == .BlueControlTint ? 0.16 : 0.09

Core Priorities

Briefly state your (2-5) core priorities that represent your primary areas of focus and the targeted business impact. Also include your critical indicators of success for each

  1. Lower the barrier of entry to adopting and understanding TypeScript. Will validate by re-requesting feedback from the community a second time like issues #31983 and hopefully it should be a new set of problems.

  2. Understand the TypeScript Codebase enough to provide useful API documentation and fix bugs. Validated by having a more comprehensive set of tools for understanding

  3. Make contributing to TypeScript easier, and reduce the amount of work maintainers need to do. Validated probably by the number of open PRs, and the number of external contributors per release.

@orta
orta / upload.yml
Created February 5, 2021 15:55
Upload GitHub Action
name: Upload infra
on:
push:
branches:
- main
- prod
jobs:
build-and-deploy:
@orta
orta / files.sh
Created January 26, 2021 15:42
Number of html files in the TypeScript website
❯ tree packages/typescriptlang-org/public -P "*.html"
packages/typescriptlang-org/public
├── Handbook
│   └── index.html
├── License.html
├── Playground
│   └── index.html
├── Tutorial
│   └── index.html
@orta
orta / types.txt
Last active December 20, 2020 21:27
Types on DT by popularity
node, yargs, events, minimatch, glob, q, istanbul-lib-coverage, istanbul-lib-report, @babel/generator, @babel/traverse, react, stack-utils, @babel/core, istanbul-reports, yargs-parser, @babel/template, prop-types, lodash, jest, color-name, json-schema, express, express-serve-static-core, connect, body-parser, serve-static, mime, parse-json, eslint-visitor-keys, range-parser, react-dom, normalize-package-data, history, long, webpack-sources, tough-cookie, request, unist, source-list-map, caseless, tapable, webpack, estree, jasmine, webpack-env, react-transition-group, selenium-webdriver, uglify-js, uuid, sizzle, react-router, @reach/router, hoist-non-react-statics, fs-extra, zen-observable, chai, anymatch, jquery, semver, debug, ws, react-syntax-highlighter, mocha, bluebird, react-redux, react-router-dom, @testing-library/dom, json5, node-fetch, jasminewd2, cheerio, is-function, react-textarea-autosize, cors, duplexify, @testing-library/react, mkdirp, babel-types, babylon, enzyme, react-native, async, keygrip,
@orta
orta / snowpack-plugin-assets.js
Last active December 6, 2020 13:51
A simple snowpack plugin for generating a .d.ts file for paths inside an asset folder
// @ts-check
const fs = require("fs")
const { join, basename } = require("path")
const { format } = require("prettier")
let log = undefined
/** @type {import("snowpack").SnowpackPluginFactory} */
function plugin(_snowpackConfig, _pluginOptions) {