Skip to content

Instantly share code, notes, and snippets.

View mqtt.js
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Refresh Sample</title>
<script src="aws-iot-sdk-browser-bundle.js"></script>
<script src="https://sdk.amazonaws.com/js/aws-sdk-2.283.1.min.js"></script>
</head>
<body>
@ijin
ijin / gas_google_forms_slack.js
Created Aug 6, 2019
Google Apps Script for Google Forms -> Slack
View gas_google_forms_slack.js
// This Google Sheets script will post to a slack channel when a user submits data to a Google Forms Spreadsheet
// View the README for installation instructions. Don't forget to add the required slack information below.
// Source: https://github.com/markfguerra/google-forms-to-slack
/////////////////////////
// Begin customization //
/////////////////////////
// Alter this to match the incoming webhook url provided by Slack
@ijin
ijin / gas_papercall_slack.js
Last active Aug 6, 2019
Google Apps Script for PaperCall -> Slack
View gas_papercall_slack.js
var slackIncomingWebhookUrl = 'https://xxxxxxxxxxxx';
var postChannel = "#serverlessdays2019";
var postIcon = ":papercall:";
var postUser = "PaperCall";
var postColor = "#FF7F50";
var messageFallback = "The attachment must be viewed as plain text.";
var messagePretext = "CFPの応募があったよ!\nhttps://www.papercall.io/slsdaystokyo2019";
var title = "Serverless Days Tokyo CFP";
var searchString = "New Submission For ServerlessDays Tokyo 2019";
@ijin
ijin / keybase.md
Created Aug 5, 2018
keybase proof
View keybase.md

Keybase proof

I hereby claim:

  • I am ijin on github.
  • I am ijin (https://keybase.io/ijin) on keybase.
  • I have a public key ASC0K2jw7KG85ZUgkGzUlvumbqPjziWb8_xoVmxYsbsFsgo

To claim this, I am signing this object:

@ijin
ijin / ecspresso_run_and_notify.sh
Last active Oct 24, 2018
Run task on ECR with ecspresso and notify via slack
View ecspresso_run_and_notify.sh
#!/bin/bash
set -x
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7`
export CONFIG_YML=$1
shift
echo "running task"
time ./ecspresso run --config=$CONFIG_YML $@
@ijin
ijin / ecspresso_deploy_and_notify.sh
Last active Dec 7, 2018
Deploy to ECR with ecspresso and notify via slack
View ecspresso_deploy_and_notify.sh
#!/bin/bash
set -x
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7`
export CONFIG_YML=$1
shift
export SERVICE=`./ecspresso deploy --config=$CONFIG_YML --dry-run | grep Service | awk '{print $2}'`
echo "deploying"
time ./ecspresso deploy --config=$CONFIG_YML $@
@ijin
ijin / pm_deploy_and_notify.sh
Last active Jun 29, 2017
Deploy with pm2 and notify via slack
View pm_deploy_and_notify.sh
#!/bin/bash
set -x
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7`
export ENV=`echo $1 | rev | cut -d \- -f1 | rev`
pm2 deploy ./app/config/deploy/deploy.json $1 update --force
if [ $? -eq 0 ]; then
export SL_COLOR="good"
@ijin
ijin / echo_and_notify.sh
Last active Jun 26, 2017
echo_and_notify_sh
View echo_and_notify.sh
#!/bin/bash
set -x
export SHA1=`echo ${CIRCLE_SHA1} | cut -c1-7`
export ENV=`echo $1 | rev | cut -d \- -f1 | rev`
echo "hi"
if [ $? -eq 0 ]; then
export SL_COLOR="good"
View pip_install_lamvery_without_libyaml-devel.sh
Running setup.py install for PyYAML
checking if libyaml is compilable
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c build/temp.linux-x86_64-2.7/check_libyaml.c -o build/temp.linux-x86_64-2.7/check_libyaml.o
build/temp.linux-x86_64-2.7/check_libyaml.c:2:18: fatal error: yaml.h: No such file or directory
#include <yaml.h>
^
compilation terminated.
libyaml is not found or a compiler error: forcing --without-libyaml
(if libyaml is installed correctly, you may need to
specify the option --include-dirs or uncomment and
@ijin
ijin / pip_install_lamvery.sh
Created Jan 13, 2017
lamvery install problem
View pip_install_lamvery.sh
[ec2-user@ip-172-31-22-129 ~]$ sudo yum -y install gcc libyaml-devel
.....
....
...
..
.
Installed:
gcc.noarch 0:4.8.3-3.20.amzn1 libyaml-devel.x86_64 0:0.1.6-6.7.amzn1
Dependency Installed: