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
//content script = ship, feature component = morpheus. | |
console.log("Morpheus injected"); | |
const features = new Map(); | |
function messageToMorpheus(msg) { | |
window.postMessage({ direction: "from-ship", message: msg }, "*"); | |
} | |
chrome.runtime.onMessage.addListener((msg, _, sendResponse) => { |
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
1 |
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
actor { | |
serializers { | |
akka-persistence-message = "Akka.Persistence.Serialization.MessageSerializer, Akka.Persistence" | |
akka-persistence-snapshot = "Akka.Persistence.Serialization.SnapshotSerializer, Akka.Persistence" | |
akka-singleton = "Akka.Cluster.Tools.Singleton.Serialization.ClusterSingletonMessageSerializer, Akka.Cluster.Tools" | |
akka-sharding = "Akka.Cluster.Sharding.Serialization.ClusterShardingMessageSerializer, Akka.Cluster.Sharding" | |
} | |
serialization-bindings { | |
"Akka.Persistence.Serialization.IMessage, Akka.Persistence" = akka-persistence-message | |
"Akka.Persistence.Serialization.Snapshot, Akka.Persistence" = akka-persistence-snapshot |
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
internal class ClusterShardingMongoSerializer : IBsonSerializer | |
{ | |
private const string ManifestField = "manifest"; | |
private const string BodyField = "body"; | |
private readonly ClusterShardingMessageSerializer _serializer; | |
public ClusterShardingMongoSerializer(ExtendedActorSystem system) | |
{ | |
_serializer = new ClusterShardingMessageSerializer(system); | |
} |
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
internal class ClusterShardingPersistenseConfig | |
{ | |
public static void Initialize(ActorSystem system) | |
{ | |
MongoDbPersistence.Get(system); | |
var serializer = new ClusterShardingMongoSerializer(system as ExtendedActorSystem); | |
BsonClassMap.RegisterClassMap<JournalEntry>(e => { | |
e.AutoMap(); | |
e.MapField(a => a.Payload).SetSerializer(serializer); | |
}); |
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
export function declination(number, titles) { | |
const cases = [2, 0, 1, 1, 1, 2]; | |
return titles[(number % 100 > 4 && number % 100 < 20) ? 2 : cases[(number % 10 < 5) ? number % 10 : 5]]; | |
} | |
const SECOND = 1000; | |
const MINUTE = 60 * SECOND; | |
const HOUR = 60 * MINUTE; | |
const DAY = 24 * HOUR; | |
const WEEK = 7 * DAY; |
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 abstract class BaseObject : INotifyPropertyChanged | |
{ | |
public event PropertyChangedEventHandler PropertyChanged; | |
protected void Setter<T>(ref T setter, T newVal, Expression<Func<T>> property, params Expression<Func<object>>[] dependentProperties) | |
{ | |
if (!equals(GetPropValue(property), newVal)) | |
{ | |
setter = newVal; | |
NotifyDependentProps(property, dependentProperties); |
This is the hack approach to adding environment variables to the nginx configuration files. As with most Google results for this search, the reason is Docker.
I intended to deploy two Docker containers.
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
{ | |
"title": "bubyanlogs", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "@level=error", | |
"alias": "", | |
"color": "#BF1B00", | |
"id": 0, |
NewerOlder