Skip to content

Instantly share code, notes, and snippets.

View broklyngagah's full-sized avatar

pieter lelaona broklyngagah

  • Rebelworks
  • Jakarta
View GitHub Profile
@broklyngagah
broklyngagah / graceful.go
Created January 14, 2018 13:31 — forked from peterhellberg/graceful.go
*http.Server in Go 1.8 supports graceful shutdown. This is a small example.
package main
import (
"context"
"log"
"net/http"
"os"
"os/signal"
"time"
)
@broklyngagah
broklyngagah / sendMail.go
Created September 21, 2017 07:56 — forked from andelf/sendMail.go
golang send mail net/smtp SMTP
package main
import (
"log"
"net/mail"
"encoding/base64"
"net/smtp"
"fmt"
"strings"
@broklyngagah
broklyngagah / underscore.go
Created August 31, 2017 08:09 — forked from regeda/underscore.go
Convert CamelCase to underscore in golang
package main
import (
"testing"
"unicode"
"unicode/utf8"
"github.com/stretchr/testify/assert"
)
@broklyngagah
broklyngagah / golang_job_queue.md
Created August 16, 2017 22:20 — forked from harlow/golang_job_queue.md
Job queues in Golang
@broklyngagah
broklyngagah / worker-pool.go
Created August 16, 2017 22:20 — forked from harlow/worker-pool.go
Worker pool to control concurrency and collect results
package main
import (
"fmt"
"sync"
"time"
)
const concurrency = 3
@broklyngagah
broklyngagah / generator.go
Created August 3, 2017 19:01 — forked from mfojtik/generator.go
Simple generator for Golang
package main
import (
"fmt"
"log"
"math/rand"
"regexp"
"strconv"
"strings"
"time"
# supervisor
#
# Author: Günter Grodotzki <[email protected]>
# Version: 2015-04-25
#
# set param "SUPERVISE=enable" to activate
#
packages:
yum:
python27-setuptools: []
@broklyngagah
broklyngagah / Laravel PHP7 LEMP AWS.md
Created February 13, 2017 23:37 — forked from santoshachari/Laravel PHP7 LEMP AWS.md
Laravel 5.x on Ubuntu 14.x, PHP 7.x, Nginx 1.9.x

#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. This tutorial is the improvised verision of this tutorial on Digitalocean based on my experience.

Install PHP 7 on Ubuntu

Run the following commands in sequence.

sudo apt-get install -y language-pack-en-base
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install zip unzip
@broklyngagah
broklyngagah / beanstalkd.config
Created September 2, 2016 13:04 — forked from mattzuba/beanstalkd.config
beanstalkd.config
sources:
/tmp: https://github.com/kr/beanstalkd/archive/v1.10.tar.gz
commands:
01_make_beanstalkd:
cwd: /tmp/beanstalkd-1.10
command: make
02_install_beanstalkd:
cwd: /tmp/beanstalkd-1.10
@broklyngagah
broklyngagah / phalconphp_php7_ubuntu_16_04.sh
Created July 9, 2016 17:52 — forked from Tosyn/phalconphp_php7_ubuntu_16_04.sh
PhalconPhp with PHP7 Installation on Ubuntu 16.04
#!/bin/bash
# PhalconPhp with PHP7 installation on ubuntu:16.04
sudo apt-get update
sudo apt-get install -y php7.0-fpm \
php7.0-cli \
php7.0-curl \
php7.0-gd \