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
version: '2' | |
services: | |
nginx-proxy: | |
image: nginxproxy/nginx-proxy | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: | |
- vhost:/etc/nginx/vhost.d |
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 insertWithTransition(el: HTMLElement, activeClass = 'is-active') { | |
el.classList.remove(activeClass); | |
setTimeout(() => { | |
el.classList.add(activeClass); | |
}, 0); | |
} | |
function removeWithTransition(el: HTMLElement, activeClass = 'is-active') { | |
const clone = el.cloneNode(true) as HTMLDivElement; |
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> | |
<head> | |
<title>Parcel Sandbox</title> | |
<meta charset="UTF-8" /> | |
</head> | |
<body> | |
<div id="app"> | |
<div class="left">Left</div> |
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
using System.Collections.Generic; | |
using UnityEngine; | |
public class ExposedReferencesTable : MonoBehaviour, IExposedPropertyTable | |
{ | |
public List<PropertyName> properties = new(); | |
public List<Object> references = new(); | |
public T Get<T>(ExposedReference<T> reference) where T : Object | |
{ |
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
class Example : MonoBehaviour { | |
// Assets only | |
[AssetsOnly] | |
public GameObject SomePrefab; | |
[AssetsOnly] | |
public List<GameObject> OnlyPrefabs; | |
// SceneObjectsOnly | |
[SceneObjectsOnly] | |
public GameObject SomeSceneObject; |
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
button.click(); // nothing | |
event = document.createEvent ('MouseEvents'); | |
event.initEvent('click', true, true); | |
button.dispatchEvent(click) // nothing | |
// here I discover `event.isTrusted` | |
event = document.createEvent ('MouseEvents'); | |
event.initEvent('click', true, true); |
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
using System; | |
// Interface segregation | |
interface ISimulationReporter<TResult> | |
{ | |
event Action<TResult> OnComplete; | |
} | |
interface ISimulationRunner<TInput> |
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 { equal } from 'assert'; | |
import { FIRST_FRAME } from './Netcode'; | |
import { NetcodeClient } from './NetcodeClient'; | |
import { NetcodeServer } from './NetcodeServer'; | |
type UserId = 'a' | 'b'; | |
type Input = 'RUN' | null; | |
interface Entity { | |
x: number; |
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 $new() { | |
var obj = Object.create(this); | |
obj.init.apply(obj, arguments); | |
return obj; | |
} |
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
Show hidden characters
{ | |
// JSHint Default Configuration File (as on JSHint website) | |
// See http://jshint.com/docs/ for more details | |
"maxerr" : 50, // {int} Maximum error before stopping | |
// Enforcing | |
"bitwise" : true, // true: Prohibit bitwise operators (&, |, ^, etc.) | |
"camelcase" : true, // true: Identifiers must be in camelCase | |
"curly" : false, // true: Require {} for every new block or scope |
NewerOlder