Skip to content

Instantly share code, notes, and snippets.

# https://developers.google.com/calendar/api/quickstart/ruby
require "google/apis/calendar_v3"
require "googleauth"
require "googleauth/stores/file_token_store"
require "date"
require "fileutils"
OOB_URI = "urn:ietf:wg:oauth:2.0:oob".freeze
APPLICATION_NAME = "Google Calendar API Ruby Quickstart".freeze
CREDENTIALS_PATH = "credentials.json".freeze
@kechol
kechol / Dockerfile
Last active August 9, 2020 07:48
sentry-cli cloud builder
FROM getsentry/sentry-cli:latest
RUN apk add --no-cache bash
ENTRYPOINT ["/bin/sentry-cli"]
@kechol
kechol / Dockerfile
Created August 9, 2020 07:45
envsubst cloud builder
FROM alpine:latest
RUN apk add --no-cache bash gettext
ENTRYPOINT ["/usr/bin/envsubst"]
@kechol
kechol / RayTracer.cpp
Created December 18, 2011 10:01
ICGで作成したRayTraceのコード
// The main ray tracer.
#pragma warning (disable: 4786)
#include "RayTracer.h"
#include "scene/light.h"
#include "scene/material.h"
#include "scene/ray.h"
#include "parser/Tokenizer.h"
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Subscriptions - RSS</title>
</head>
<body>
<outline text="CAPITALISTS" title="CAPITALISTS">
<outline htmlUrl="https://500hats.com?source=rss----adacc3043f65---4" title="500 Hats - Medium" xmlUrl="https://500hats.com/feed" type="rss" text="500 Hats - Medium"/>
<outline htmlUrl="http://thomasgr.tumblr.com/" title="A personal view on Venture Capital" xmlUrl="http://thomasgr.tumblr.com/rss" type="rss" text="A personal view on Venture Capital"/>
<outline htmlUrl="http://abovethecrowd.com" title="Above the Crowd" xmlUrl="http://abovethecrowd.com/feed/" type="rss" text="Above the Crowd"/>
@kechol
kechol / deploy.coffee
Last active September 23, 2019 20:45
hubot deploy script
# Description:
# Capistrano deployment from hubot
#
# Dependencies:
# Prepare capistrano config files in your repo.
#
# Configuration:
# None
#
# Commands:
@kechol
kechol / Dockerfile
Last active September 22, 2019 06:39
devcontainer for ruby2 and hanami setup
FROM ruby:2.6.4
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
ENV BUNDLE_JOBS=4 \
BUNDLE_PATH=/vendor/bundle
RUN apt-get update \
&& apt-get install -y git iproute2 procps postgresql \
require "net/http"
require "uri"
require "json"
ENDPOINT = 'https://sentry.io/api/0'.freeze
TOKEN = 'XXXXXXXXXX'.freeze
def sentry_api(url)
uri = URI.parse(url)
@kechol
kechol / index.js
Last active May 22, 2019 13:58
Cloud function to notify labeled issue.
"use strict";
const request = require("request");
const SLACK_WEBHOOK_URL = "https://hooks.slack.com/services/XXXXXXXXXXXXXXXXXXXXXXXXXXX";
const LABEL_NAMES = ["bug"];
exports.notifyLabelIssue = (req, res) => {
console.log(req.body);