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 / 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);
@kechol
kechol / i18ncsv.rb
Last active January 21, 2019 15:10
require "json"
require "csv"
@rows = []
def row(val, key)
val.each do |k, next_val|
next_key = [key, k].join(".")
if Hash === next_val
row(next_val, next_key)
@kechol
kechol / keymap.c
Last active January 8, 2019 13:13
#include QMK_KEYBOARD_H
#include "bootloader.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
extern keymap_config_t keymap_config;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
@kechol
kechol / _log
Last active March 21, 2018 11:09
http://localhost:4000/index.html did-start-loading
http://localhost:4000/index.html did-get-response-details false http://localhost:4000/index.html http://localhost:4000/index.html 200 GET mainFrame
http://localhost:4000/index.html did-navigate http://localhost:4000/index.html
http://localhost:4000/index.html did-get-response-details false https://unpkg.com/[email protected]/normalize.css https://unpkg.com/[email protected]/normalize.css 200 GET stylesheet
http://localhost:4000/index.html did-get-response-details false https://unpkg.com/[email protected]/dist/jquery.js https://unpkg.com/[email protected]/dist/jquery.js 200 GET script
http://localhost:4000/index.html dom-ready
http://localhost:4000/index.html console-message 1 %cElectron Security Warning (Node.js Integration with Remote Content) 145
http://localhost:4000/index.html console-message 1 %cElectron Security Warning (Insecure Resources) 128
http://localhost:4000/index.html console-message 1 %cElectron Security Warning (Insecure Content-Security-Policy) 18