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 MyApp.DistributionManager do | |
use GenServer | |
require Logger | |
@app Mix.Project.config[:app] | |
def start_link(iface) do | |
GenServer.start_link(__MODULE__, iface) | |
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
defmodule Hub do | |
@moduledoc """ | |
Publish/subscribe server. | |
Subscription is done with a pattern. | |
Example: | |
{:ok, _pid} = Hub.start_link(name: :hub) | |
Hub.subscribe(:hub, %{count: count} when count > 42) |
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
#include <iostream> | |
#include <cmath> | |
#include <climits> | |
using namespace std; | |
const int MAX_N = 510; | |
const int MAX_K = 510; | |
int N, K; |
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
const web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")) | |
const abi = JSON.parse('. . .') | |
const address = '0x593b851932dAFdf8573Ed7891518b1Ba5B0d5838' | |
const contract = web3.eth.contract(abi).at(address) | |
contract.setMessage("I'm picke Rick motherfucker!", { | |
value: web3.toWei('10', 'finney'), | |
from: '0x004fC1D0F9C8d126418ab466b03A4B0E55422B64' | |
}, (error, result) => { | |
if (error) { |
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
.gradient-blue { | |
background: #283c86; | |
background: -webkit-gradient(linear, left top, right top, from(#45a247), to(#283c86)) !important; | |
background: linear-gradient(to right, #45a247, #283c86) !important | |
} | |
.gradient-love { | |
background: #cc2b5e; | |
background: -webkit-gradient(linear, left top, right top, from(#cc2b5e), to(#753a88)) !important; |
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: "3" | |
services: | |
builder: | |
build: | |
context: builder | |
image: eosio/builder:v1.2.2 | |
nodeosd: | |
container_name: nodeosd |
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
model audit_log_entries { | |
instance_id String? @db.Uuid | |
id String @id @db.Uuid | |
payload Json? @db.Json | |
created_at DateTime? @db.Timestamptz(6) | |
ip_address String @default("") @db.VarChar(64) | |
@@index([instance_id], map: "audit_logs_instance_id_idx") | |
@@schema("auth") | |
} |
OlderNewer