// A is a phantom type that ties an event instance...
class Event<A> {}
// ...to its handler
type Handler<A> = (a: A, ...rest: Array<void>) => void;
declare class EventEmitter {
on<A, F: Handler<A>>(event: Event<A>, handler: F): void;
emit<A>(event: Event<A>, a: A): void;
}
#!/bin/bash | |
# THESE ARE NOTES, NOT TESTED AS SCRIPT! | |
# We need the following to get and run teamcity agent | |
sudo apt-get install openjdk-7-jre-headless | |
sudo apt-get install unzip #For unzipping buildAgent.zip | |
# For compiling Simple.Web | |
sudo apt-get install ruby1.9.1 |
// Simple JavaScript Templating | |
// John Resig - http://ejohn.org/ - MIT Licensed | |
(function(){ | |
var cache = {}; | |
this.tmpl = function tmpl(str, data){ | |
// Figure out if we're getting a template, or if we need to | |
// load the template - and be sure to cache the result. | |
var fn = !/\W/.test(str) ? | |
cache[str] = cache[str] || |
#if UNITY_EDITOR | |
using UnityEditor; | |
using UnityEngine; | |
public static class OculusSDKAutomation | |
{ | |
private static readonly GameObject playerControllerPrefab = AssetDatabase.LoadAssetAtPath<GameObject>("Assets/Oculus/VR/Prefabs/OVRPlayerController.prefab"); | |
private static readonly GameObject controllerPrefab = AssetDatabase.LoadAssetAtPath<GameObject>("Assets/Oculus/VR/Prefabs/OVRControllerPrefab.prefab"); |
{ | |
"**/__tests__/*.js": { | |
"alternate": "{}.js", | |
"type": "test" | |
}, | |
"*.js": { | |
"alternate": "{dirname}/__tests__/{basename}.js", | |
"type": "source" | |
} | |
} |
import { | |
DataStore, | |
PersistentModel, | |
PersistentModelConstructor, | |
ProducerModelPredicate, | |
SortPredicate, | |
ProducerPaginationInput | |
} from '@aws-amplify/datastore' | |
import { useCallback, useEffect, useState } from 'react' |
using UnityEngine; | |
using UnityEditor; | |
using UnityEditor.SceneManagement; | |
using UnityEngine.SceneManagement; | |
// From https://gist.github.com/JohannesDeml/5802473b569718c9c86de906b7039aec | |
// Original https://gist.github.com/ulrikdamm/338392c3b0900de225ec6dd10864cab4 | |
// Adds a "Edit Prefab" option in the Assets menu (or right clicking an asset in the project browser). | |
// This opens an empty scene with your prefab where you can edit it. | |
// Put this script in your project as Assets/Editor/EditPrefab.cs |
Integrating third party JavaScript libraries not written with Google Closure Compiler in mind continues to both be a source of error for users when going to production, and significant vigilance and effort for the the broader community (CLJSJS libraries must provide up-to-date and accurate externs).
In truth writing externs is far simpler than most users imagine. You only need externs for the parts of the library you actually intend to use from ClojureScript. However this isn't so easy to determine from Closure's own documentation. Still in the process of writing your code it's easy to miss a case. In production you will see the much dreaded error that some mangled name does not exist. Fortunately it's possible to enable some compiler flags :pretty-print true :pseudo-names true
to generate an advanced build with human readable names. However debugging missing externs means compiling your production build for each missed case. So much time wasted for such simple mistakes damages our sen
From time to time, Musk will send out an e-mail to the entire company to enforce a new policy or let them know about something that's bothering him. One of the more famous e-mails arrived in May 2010 with the subject line: Acronyms Seriously Suck:
There is a creeping tendency to use made up acronyms at SpaceX. Excessive use of made up acronyms is a significant impediment to communication and keeping communication good as we grow is incredibly important. Individually, a few acronyms here and there may not seem so bad, but if a thousand people are making these up, over time the result will be a huge glossary that we have to issue to new employees. No one can actually remember all these acronyms and people don't want to seem dumb in a meeting, so they just sit there in ignorance. This is particularly tough on new employees.
That needs to stop immediately or I will take drastic action - I have given enough warning over the years. Unless an acronym is approved by me, it should not enter the SpaceX glossary.
echo "Creating an SSH key for you..." | |
ssh-keygen -t rsa | |
echo "Please add this public key to Github \n" | |
echo "https://github.com/account/ssh \n" | |
read -p "Press [Enter] key after this..." | |
echo "Installing xcode-stuff" | |
xcode-select --install |