Skip to content

Instantly share code, notes, and snippets.

View michimani's full-sized avatar
🍛
I love curry.

Yoshihiro Ito michimani

🍛
I love curry.
View GitHub Profile
@kboy-silvergym
kboy-silvergym / slack_invite_bot.js
Last active October 29, 2021 09:11
timesという名前がつくチャンネルに招待してくれるslack botのGAS
var legacyToken = "xoxb-xxx";
var botUserId = "D020MGLFK0A";
var targetChannelPatterns = ['times_.*'];
// WebHook用 Hook発言をしたユーザー情報を取得し、全てのchannelにinviteしてあげる
function doPost(e){
var text = e.parameter.text.substring(e.parameter.trigger_word.length).trim();
if(text != "招待して"){
return postMessage(e.parameter.channel_id, "ちょっとよくわからないです");
@jamesls
jamesls / alias
Last active January 15, 2023 21:52
AWS CLI v2 upgrade aliases.
[toplevel]
# Put this in ~/.aws/cli/alias
# and you'll have an "aws upgrade"
# and an "aws check-upgrade" command.
#
# Only works on macOS and installs using
# the .pkg installer.
#
upgrade = !f() {
curl -s "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "/tmp/AWSCLIV2.pkg"
@Yousha
Yousha / .gitignore
Last active June 6, 2024 07:52
.gitignore for C/C++ developers.
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
@lmakarov
lmakarov / lambda-basic-auth.js
Created August 30, 2017 19:15
Basic HTTP Authentication for CloudFront with Lambda@Edge
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
@CarterTsai
CarterTsai / go
Created March 4, 2017 13:20
golang s3 PutObject
package main
import (
"bytes"
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
)