$ wget https://gist.githubusercontent.com/hirokazumiyaji/cb282a59fde15311d8fbc7d8974fdf6a/raw/724ad3db9eb0d7d50a9b719946a4aefeeb64ec35/main.go
$ go build -o slack main.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
RUN apt-get -y update | |
RUN apt-get install -y wget gcc g++ make libpcre3 libpcre3-dev openssl libssl-dev sudo ffmpeg | |
RUN mkdir -p /var/nginx/modules | |
RUN cd /tmp && wget https://github.com/cubicdaiya/nginx-build/releases/download/v0.9.15/nginx-build-linux-amd64-0.9.15.tar.gz | |
RUN cd /tmp && tar xzf nginx-build-linux-amd64-0.9.15.tar.gz | |
RUN mv /tmp/nginx-build /usr/local/bin | |
RUN cd /tmp && wget https://github.com/arut/nginx-rtmp-module/archive/v1.1.11.tar.gz | |
RUN cd /tmp && tar xzf v1.1.11.tar.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- name: provision dev local | |
hosts: dev | |
connection: local | |
roles: | |
- common | |
- redis | |
- python |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" | |
"github.com/aws/aws-sdk-go/aws" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package amzn | |
import ( | |
"errors" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/service/sns" | |
"github.com/aws/aws-sdk-go/service/sns/snsiface" | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
const AWS = require('aws-sdk') | |
const queueUrl = '' | |
const sqs = new AWS.SQS({region: 'ap-northeast-1'}) | |
exports.handler = function(event, context) { | |
const params = { | |
MessageBody: JSON.stringfy({ | |
time: (new Date(Date.now())).toISOString(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"image" | |
"image/draw" | |
"io/ioutil" | |
"math/rand" | |
"net/http" | |
"path" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bytes" | |
"encoding/base64" | |
"encoding/json" | |
"fmt" | |
"net/http" | |
"net/url" | |
"os" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create_table "users", id: false, force: :cascade do |t| | |
t.integer "id", limit: 4, null: false | |
t.string "name", limit: 10, null: false | |
end | |
execute "ALTER TABLE users ADD PRIMARY KEY (id)" |