Skip to content

Instantly share code, notes, and snippets.

View gabrielgatu's full-sized avatar
✌️
Always working on something cool :)

Gabriel Gatu gabrielgatu

✌️
Always working on something cool :)
View GitHub Profile
@gabrielgatu
gabrielgatu / ejabberd.exs
Last active July 22, 2016 10:06
A sample ejabberd configuration file
defmodule Ejabberd.ConfigFile do
use Ejabberd.Config
def start do
[loglevel: 4,
log_rotate_size: 10485760,
log_rotate_date: "",
log_rotate_count: 1,
log_rate_limit: 100,
auth_method: :internal,
@gabrielgatu
gabrielgatu / ejabberd_config.md
Last active September 21, 2016 10:49
Configuration proposal

Elixir based config for ejabberd

Goals

Through the mix tools and the git based modules (see below) the goal is to allow ejabberd users to access more easily the configuration part of their project and allow them to visualize the modules used and easily add new ones from external sources.

Elixir based config file

Location

@gabrielgatu
gabrielgatu / ejabberd_elixir_errors.md
Created June 9, 2016 14:08
ejabberd errors when used with elixir

Intro

Elixir/Erlang version (on command line):

  • Erlang/OTP 18 [erts-7.3] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]
  • Elixir 1.3.0-rc.0

16.4.0

@gabrielgatu
gabrielgatu / gsoc_work_product_submission.md
Last active August 20, 2016 13:53
GSoC Work Product Submission

GSoC Work Product Submission

Improve ejabberd configuration and extensibility with configuration DSL

Introduction

The goal of this project was to develop an alternative configuration model for ejabberd, using elixir DSL capabilities, and improve, in general, the elixir support inside ejabberd.

Proposal Link

defmodule Mozzie.Service.DSL do
...
defmacro action(p1, p2, p3, do: block) do
p1 = to_list(p1)
p2 = to_list(p2)
quote do
def handle_action(unquote(p1), unquote(p2), unquote(p3)) do
case unquote(block) do
SELECT "female_artists".name AS artist_name, MAX("recording".length), "recording".name /* Qui voglio selezionare più di una colonna, tra qui adoperare una MAX sulla lunghezza delle canzoni */
FROM "artist_credit_name"
INNER JOIN (
SELECT "artist".*
FROM "artist"
INNER JOIN "gender" ON "artist".gender = "gender".id
WHERE "gender".name = 'Female'
) AS "female_artists" ON "artist_credit_name".artist = "female_artists".id
query {
search(query: "stars:>10", type: REPOSITORY, first: 12, after: "Y3Vyc29yOjI=") {
repositoryCount,
pageInfo {
hasNextPage
endCursor
}
edges {
import 'package:flutter/material.dart';
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(home: Home());
}
}
{
// terminal
"terminal.integrated.drawBoldTextInBrightColors": true,
"terminal.integrated.windowsEnableConpty": false,
"terminal.integrated.rendererType": "canvas",
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.fontSize": 14,
// "terminal.integrated.fontFamily": "ubuntu mono, iosevka",
"terminal.integrated.fontWeight": "200",
"terminal.integrated.fontWeightBold": "400",
# Specify analysis options.
#
# Until there are meta linter rules, each desired lint must be explicitly enabled.
# See: https://github.com/dart-lang/linter/issues/288
#
# For a list of lints, see: http://dart-lang.github.io/linter/lints/
# See the configuration guide for more
# https://github.com/dart-lang/sdk/tree/master/pkg/analyzer#configuring-the-analyzer
#
# There are other similar analysis options files in the flutter repos,