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 akka.actor.IO._ | |
import akka.actor.{Props, IO, IOManager, Actor, ActorSystem} | |
import akka.event.Logging | |
import akka.util.ByteString | |
import java.net.InetSocketAddress | |
class TCPEchoServer(port: Int) extends Actor { | |
val log = Logging(context.system, this) | |
val state = IterateeRef.Map.async[IO.Handle]()(context.dispatcher) |
This is a compilation of various open-source Unity plugins, codebases, or utility scripts that may aid in expediting the development process.
"ProbePolisher is a Unity Editor plugin for editing light probes. It works both on Unity Basic (free) and Unity Pro."
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
defmodule ROP do | |
defmacro try_catch(args, func) do | |
quote do | |
(fn -> | |
try do | |
unquote(args) |> unquote(func) | |
rescue | |
e -> {:error, e} | |
end |
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
# To show hot code uploading, we first need to build a simple phoenix project so we can see it happen in real time. | |
# Start by making a new phoenix project | |
$ mix phoenix.new hotcode | |
# Go into the directory | |
$ cd hotcode | |
# Add exrm dependency to mix.exs file | |
{:exrm, "~> 1.0.3"} |
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 bash | |
# | |
# Author: Stefan Buck | |
# License: MIT | |
# https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
# | |
# | |
# This script accepts the following parameters: | |
# | |
# * owner |
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
module SingletonIncrementer exposing (..) | |
{-| Experiment on implementing type-safe OTP compliant GenServer | |
-} | |
import Platform exposing (Task(..)) | |
import Task | |
import Time | |
If you have many ports, they could be all over your project, and therefore hard to manage and easy for forget about. Keep track of all of them by representing your outgoing ports in a union type like..
type JsMsg
= Download
| Login Login.Payload
| Logout
| Track Tracking.Payload