Skip to content

Instantly share code, notes, and snippets.

View makefunstuff's full-sized avatar
😇
Why?

Iurii Plugatariov makefunstuff

😇
Why?
View GitHub Profile
@makefunstuff
makefunstuff / .vimrc
Created July 1, 2022 20:21 — forked from jdah/.vimrc
jdh's NeoVim .vimrc
call plug#begin()
Plug 'drewtempelmeyer/palenight.vim'
Plug 'vim-airline/vim-airline'
Plug 'wlangstroth/vim-racket'
Plug 'sheerun/vim-polyglot'
Plug 'rust-lang/rust.vim'
Plug 'preservim/tagbar'
Plug 'universal-ctags/ctags'
Plug 'luochen1990/rainbow'
Plug 'vim-syntastic/syntastic'
@makefunstuff
makefunstuff / rename_phoenix_project.sh
Created October 15, 2018 07:10 — forked from kumekay/rename_phoenix_project.sh
rename a phoenix 1.3 project
#!/bin/bash
set -e
CURRENT_NAME="CurrentName"
CURRENT_OTP="current_name"
NEW_NAME="NewName"
NEW_OTP="new_name"

Keybase proof

I hereby claim:

  • I am makefunstuff on github.
  • I am swks (https://keybase.io/swks) on keybase.
  • I have a public key ASCfA8L6PnpiHPUBVLxAdCuUcvRKlnO6LEpRbYoH6n0l4Ao

To claim this, I am signing this object:

def FlowExample do
def process(tickets_batch) do
customer_flow = create_customer_flow(tickets_batch)
messages_flow = create_messages_flow(tickets_batch)
Flow.bounded_join(:inner,
customer_flow,
messages_flow,
&(&1.number),
&(&1.number),
defmodule NaiveSolution do
def process(tickets_batch) do
tickets
|> Enum.map(&async_process/1)
|> Enum.map(&Task.await/1)
end
def async_process(ticket) do
Task.async fn() ->
ticket
[
%OurImportModule.Ticket{
id: 23,
imported: false,
title: "Awesome ticket",
messages_url: "http://ticket-api.com/23/messages,
customer_url: "https://ticket-api.com/23/customer
},
...
]

Keybase proof

I hereby claim:

  • I am strangeworks on github.
  • I am swks (https://keybase.io/swks) on keybase.
  • I have a public key ASDL9GUt294pSlGZvsXGah9RtwlC8LQ2WMnSUZdOYR2IlAo

To claim this, I am signing this object:

Bot.on :message do |message|
if message.quick_reply && message.quick_reply.match?('time')
message.reply(text: 'Thank you I will notify you very soon, have a good and productive day!')
end
if message.quick_reply && message.quick_reply == 'setup_started'
User.find_or_create_by(facebook_id: message.sender['id'])
message.reply(
text: 'When should I ask you about your day?',
Bot.on :postback do |postback|
case postback.payload
when 'SETUP_BOT'
postback.reply(
text: 'Hello, I am your personal lifelog assistant, let me help you with setup procedure',
quick_replies: [
{
content_type: 'text',
title: 'I want to set you up',
payload: 'setup_started'
Bot.on :postback do |postback|
case postback.payload
when 'SETUP_BOT'
postback.reply(text: 'Hello, I am your personal lifelog assistant, let me help you with setup procedure')
when 'RESET'
# TODO: we will implement reset functionality soon
postback.reply(text: 'Reset has been completed')
else
Rails.logger.warn('Unhandled postback')