Skip to content

Instantly share code, notes, and snippets.

@ijin
ijin / mqtt.js
Last active October 6, 2021 00:38
<!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 August 6, 2019 09:11
Google Apps Script for Google Forms -> Slack
// 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 August 6, 2019 09:09
Google Apps Script for PaperCall -> Slack
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 August 5, 2018 20:23
keybase proof

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 October 24, 2018 04:18
Run task on ECR with ecspresso and notify via slack
#!/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 December 7, 2018 08:57
Deploy to ECR with ecspresso and notify via slack
#!/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 June 29, 2017 17:35
Deploy with pm2 and notify via slack
#!/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 June 26, 2017 04:57
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"
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 January 13, 2017 09:05
lamvery install problem
[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: