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
package com.ornithoptergames.psav | |
import java.nio.file.StandardWatchEventKinds.ENTRY_MODIFY | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.duration._ | |
import com.beachape.filemanagement.RxMonitor | |
import com.ornithoptergames.psav.FrameInfoLoader._ | |
import com.ornithoptergames.psav.Messages._ | |
import com.ornithoptergames.psav.RxMessage.Implicits._ | |
import akka.actor.ActorSystem |
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
public class GameModel : MonoBehaviour { | |
public FloatReactiveProperty Score { get; private set; } | |
void Awake() { | |
Score = new FloatReactiveProperty(0f).AddTo(this); | |
} | |
} | |
public class ScoreUI : MonoBehaviour { |
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
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation"> | |
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean> | |
<s:Boolean x:Key="/Default/CodeInspection/Highlighting/IdentifierHighlightingEnabled/@EntryValue">True</s:Boolean> | |
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=SuggestVarOrType_005FSimpleTypes/@EntryIndexedValue">DO_NOT_SHOW</s:String> | |
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=UnassignedField_002ECompiler/@EntryIndexedValue">DO_NOT_SHOW</s:String> | |
<s:String x:Key="/Default/CodeStyle/CodeCleanup/RecentlyUsedProfile/@EntryValue">Default: Reformat Code</s:String> | |
<s:String x:Key="/Defaul |
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
// Define our shapes. | |
trait Shape | |
class Rectangle extends Shape | |
class Ellipse extends Shape | |
class Triangle extends Shape | |
object Shape { | |
// The method we'll call to perform an intersection. | |
def intersect[A <: Shape, B <: Shape](a: A, b: B)(implicit ev: Intersection[A,B]): Unit = { |
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 UnityEngine; | |
using UniRx; | |
using UniRx.Triggers; | |
// NOTE: Unity won't actually let you put two MonoBehaviours in one file. | |
// They're both listed here just for convenience. | |
namespace Assets.Scripts.v1 { | |
public class InputsV1 : MonoBehaviour { |
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 UnityEngine; | |
using UniRx; | |
using UniRx.Triggers; | |
// NOTE: Unity won't actually let you put two MonoBehaviours in one file. | |
// They're both listed here just for convenience. | |
namespace Assets.Scripts.v2 { | |
public class InputsV2 : MonoBehaviour { |
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 UnityEngine; | |
using UniRx; | |
using UniRx.Triggers; | |
namespace Assets.Scripts.v3 { | |
public class InputsV3 : MonoBehaviour { | |
// Singleton. | |
public static InputsV3 Instance { get; private set; } |
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; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
// I recommend dropping this script in an Editor folder. | |
// You should have two audio clips somewhere in the project. | |
// You'll need to edit-in the paths of those clips (from your project root folder) in the static initializer below. | |
// Example path: "Assets/Editor/CompileIndicator/start.mp3" |
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
def details(since: Option[LocalDate], until: Option[LocalDate], page: Int): Future[NumberedDetailsPage] = { ... } | |
details(since, until, 1).flatMap { page1 => | |
val pagesFuture = Future.sequence( | |
for { | |
n <- (2 to page1.details.totalPages).toList | |
} yield { | |
details(since, until, n) | |
} |
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
#!/usr/bin/env python | |
import os, subprocess, json | |
# Get all bookmarks matching the given name(s) | |
def get_bookmarks(profile_dir, names): | |
with open(os.path.join(profile_dir, 'Bookmarks')) as f: | |
j = json.load(f) | |
results = [] | |
# There are two root-level bookmark folders: one for the bookmark bar and one for all others. |