- Set the same erlang cookies (
~/.erlang-cookie
or:erlang.set_cookie :abc
) - On the WSL machine, use
ifconfig
to find out the IP address of the WSL machine - Start nodes with FQDN using their IP address as hostname:
iex --name main@[ip] -S mix [command]
- On the WSL machine, run
epmd -names
to find the port of the erlang node that has just been started - On the WSL host, run these commands in powershell:
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 RepoStream do | |
defmodule Producer do | |
use GenStage | |
defstruct [:demand, :pid] | |
def start_link() do | |
GenStage.start_link(__MODULE__, self()) | |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Test</title> | |
<style> | |
body { | |
color: white; | |
background: black; | |
font-family: "Helvetica", Arial, sans-serif; | |
} |
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 <avr/interrupt.h> | |
#include <avr/pgmspace.h> | |
#include <Arduino.h> | |
#include <SoftwareSerial.h> | |
#ifndef SEVEN_E_1_SERIAL | |
#define SEVEN_E_1_SERIAL | |
#define _DEBUG 0 | |
#define _DEBUG_PIN1 11 |
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 Model do | |
schema "models" do | |
field :foo, :string | |
has_many :children, Model, foreign_key: :parent_id | |
belongs_to :parent, Model, foreign_key: :parent_id | |
end | |
@doc """ | |
Recursively loads parents into the given struct until it hits nil | |
""" |
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
*smoothScroll.js* | |
*smooth*.js* | |
*nicescroll*js* | |
*jquery.mousewheel.js* | |
*plugins-scroll.js* | |
https://d33wubrfki0l68.cloudfront.net/bundles/85ee573a175fbccec4ed26bf47ede7fd06c1d248.js |
This gist aims to be a fairly complete list of all known shortcuts all around OS X (and some OS X applications).
In this gist, there are sometimes multiple shortcuts for the same action. In that case, the shortcuts are ordered by how ergonomically you can press them, in descending order. That means that you should always learn the first shortcut in the list.
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
let child = require("child_process") | |
let source_map = require("source-map") | |
let SourceMapConsumer = source_map.SourceMapConsumer | |
let path = require("path") | |
var crypto = require('crypto'); | |
module.exports = function(source, sourceMap) { | |
this.cacheable() | |
this.async() | |
var self = this |
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 java.util.Random; | |
public class SimpleRandom extends Random { | |
long seed; | |
public SimpleRandom(long seed) { | |
setSeed(seed); | |
} | |
@Override |
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 PolymorphicEmbed do | |
@moduledoc """ | |
Allows you to embed with an unknown schema at compile time. | |
The schema is decided by a `type_field` which could be an elixir module, | |
but also an enum which can be converted into a module with an `embedded_schema`. | |
""" | |
use Ecto.Type |
NewerOlder