Skip to content

Instantly share code, notes, and snippets.

View monirz's full-sized avatar
💻
Focusing

Moniruzzaman Monir monirz

💻
Focusing
View GitHub Profile
package main
import (
"fmt"
"net/http"
"github.com/gorilla/mux"
)
func main() {
package main
import (
"database/sql"
"encoding/json"
"fmt"
"log"
"net/http"
"os"
#/etc/supervisor/conf.d/myapp.conf
[program:myapp]
directory=/root/gocode/src/github.com/monirz/myapp
command=/root/gocode/src/github.com/monirz/myapp/myapp
autostart=true
autorestart=true
stderr_logfile=/var/log/myapp.err
stdout_logfile=/var/log/myapp.log
environment=CODENATION_ENV=prod
package main
import (
"errors"
"fmt"
"os"
)
func main() {
package main
import (
"context"
"log"
"github.com/tinode/chat/pbx"
"google.golang.org/grpc"
)
func formatDateTime(t time.Time) string {
layout := "2006-08-2 11:08:09"
str := t.Format(layout)
return str
}
package validator
import (
"log"
"net/http"
"reflect"
"strconv"
"strings"
"github.com/asaskevich/govalidator"
%%%
%%% ejabberd configuration file
%%%
%%%'
%%% The parameters used in this configuration file are explained in more detail
%%% in the ejabberd Installation and Operation Guide.
%%% Please consult the Guide in case of doubts, it is included with
%%% your copy of ejabberd, and is also available online at
%%% http://www.process-one.net/en/ejabberd/docs/
{deps, [
{cowboy, "2.0.0", {git, "git://github.com/ninenines/cowboy.git", {tag, "2.0.0"}}},
{riakc, "2.5.*", {git, "https://github.com/basho/riak-erlang-client", {tag, "2.5.1"}}},
{riak_pb, {git, "https://github.com/basho/riak_pb", {tag, "2.1.4.2"}}}
]
}.
{plugins, [rebar3_run]}.
{relx, [{release, { cowboy_riak, "0.1.0" },
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strconv"
"time"