Skip to content

Instantly share code, notes, and snippets.

View eqon133's full-sized avatar

Egon Valk eqon133

  • Tartu, Estonia
View GitHub Profile
@uri
uri / actor_tutorial.exs
Created October 25, 2017 03:02
An example of the actor pattern in Elixir.
@moduledoc """
This file showcases how the actor pattern works in elixir by using send/receive
to pass messages and spawn to create a separate state for an actor.
import ActorTutorial
Create a tally actor and send a message
tally = start_tally()
send tally, {:add, 5}
@andrewmwilson
andrewmwilson / gmail_to_slack.js
Last active May 31, 2023 13:02
Google Apps Script: Send Gmail emails to Slack
// You will also need to create a gmail filter to add the 'send-to-slack' label
// to any emails you want sent to slack
function sendEmailsToSlack() {
var label = GmailApp.getUserLabelByName('send-to-slack');
var messages = [];
var threads = label.getThreads();
for (var i = 0; i < threads.length; i++) {
messages = messages.concat(threads[i].getMessages())