Skip to content

Instantly share code, notes, and snippets.

@KhaosT
KhaosT / HDMI on Apple Vision Pro.md
Last active June 21, 2024 08:33
Guide for using Apple Vision Pro as HDMI display

Displaying HDMI sources on Apple Vision Pro

While it's possible to stream most content to Apple Vision Pro directly over the internet, having the ability to use Apple Vision Pro as an HDMI display can still be useful.

Since Apple Vision Pro does not support connecting to an HDMI input directly or using an HDMI capture card, we have to be a little creative to make this work. NDI provides the ability to stream HDMI content over a local network with really low latency, and it works great with Apple Vision Pro.

This page shows the setup I’m using.

@chriskrycho
chriskrycho / a_question.md
Last active May 5, 2023 14:53
Ember block content enforcement (relevant to Vue/Svelte slots and React children, too!)

I was wondering if there's currently any way in TS to enforce the child types passed into a yield block? I looked into the component signature and it seems like Blocks specifies the things that are yielded out but doesn't impose any restrictions on what's passed in.

For example, if I have some component Foo:

<div class="foo">
  {{yield}}
</div>
@Robert-96
Robert-96 / README.md
Last active May 4, 2024 06:05
Ember.Js: Installing Tailwind CSS

Ember.Js: Installing Tailwind CSS

TL;DR

$ ember install ember-cli-postcss                   # Install ember-cli-postcss
$ npm install --save-dev tailwindcss                # Install tailwindcss

$ npx tailwind init app/styles/tailwind.config.js   # Optional: Generate a Tailwind config file for your project  
$ npm install -save-dev postcss-import # Optional: If you want to use the @import statement
@samselikoff
samselikoff / README.md
Last active June 24, 2020 19:56
How to use an `asyncThrows` custom helper.

This assert.asyncThrows custom assertion allows us to write tests against failing async code, usually as a result of a server error (4xx/5xx response).

test('If the index route errors, I see a message', async function(assert) {
  server.create('post');
  server.get('/posts/:id', { errors: ['The site is down'] }, 500); // force Mirage to error

  await assert.asyncThrows(() => {
    return visit('/posts/1');
 }, 'GET /posts/1 returned a 500');
defmodule SogApi.Deserialize do
def init(options) do
options
end
def call(%Plug.Conn{params: %{"format" => "json-api"}, method: "POST"}=conn, _opts) do
result = _deserialize(conn)
end
def call(%Plug.Conn{params: %{"format" => "json-api"}, method: "PUT"}=conn, _opts) do
package main
import (
"net/http"
"database/sql"
"fmt"
"log"
"os"
)
var Ember = require('ember');
module.exports = Ember.View.extend({
attributeBindings: ['route'],
route: function() {
return this.get('controller.currentPath');
}.property('controller.currentPath')
getModelTypes: function() {
var namespaces = Ember.A(Ember.Namespace.NAMESPACES), types = Ember.A(), self = this;
Object.keys(window.require._eak_seen).reduce(function(previous, item, index, enumerable) {
var match;
if ((match = item.match(/app\/models\/(\w+)/)) && match[1]) {
previous.push(self.get('container').lookupFactory('model:' + match[1]));
}
@ryanflorence
ryanflorence / angular.js
Last active October 30, 2019 01:42
Comparing an avatar implementation with angular and ember. http://www.angularails.com/articles/creating_simple_directive_in_angular
// Because people can't seem to find the gist description, here is the source
// of this code, a post found in last weeks JS Weekly, it is not my code
// http://www.angularails.com/articles/creating_simple_directive_in_angular
angular.module('ui-multi-gravatar', [])
.directive('multiAvatar', ['md5', function (md5) {
return {
restrict: 'E',
link:function(scope, element, attrs) {
@HeroicEric
HeroicEric / WildberryFresh.tmTheme
Created June 18, 2012 15:44
Wildberry Fresh Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>comment</key>
<string>http://erickel.ly</string>
<key>name</key>
<string>WildberryFresh</string>
<key>settings</key>
<array>