Skip to content

Instantly share code, notes, and snippets.

@zakovyrya
zakovyrya / ring.erl
Created July 20, 2009 17:42
USAGE: ring:start(M,N,Msg).<br/>M: times to pass message, N: number of processes in ring, Msg: message
-module(ring).
-export([start_node/3, start_node/4]).
-export([start/3]).
start(M, N, Msg) when (M>0) and (N>0) -> spawn(?MODULE, start_node, [M, N, Msg]).
start_node(M, N, Msg) ->
NextPid = spawn(?MODULE, start_node, [M, N-1, Msg, self()]),
io:format("DEBUG: started first node. pid: ~p, npid: ~p, N: ~p~n", [self(), NextPid, N]),
hd(lists:reverse(lists:sort([ {element(2, process_info(P, memory)), P} || P <- erlang:processes(), erlang:is_process_alive(P)]))).
// Processing code by Etienne JACOB
// motion blur template by beesandbombs
// opensimplexnoise code in another tab might be necessary
// --> code here : https://gist.github.com/Bleuje/fce86ef35b66c4a2b6a469b27163591e
int[][] result;
float t, c;
float ease(float p) {
@zakovyrya
zakovyrya / FacebookAuth.swift
Created July 13, 2020 21:53 — forked from ethanhuang13/FacebookAuth.swift
FacebookAuth is for iOS app developers who need to support Facebook login but don't want to use the official SDK
//
// FacebookAuth.swift
// GitHub: ethanhuang13
// Twitter: @ethanhuang13
import AuthenticationServices
import SafariServices
/*
Updated: