Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am sat0b on github.
  • I am sat0b (https://keybase.io/sat0b) on keybase.
  • I have a public key ASDFoVqHUB-3TwaJMndYnhDq-0yEjppWLelnDLnUPYidvgo

To claim this, I am signing this object:

@sat0b
sat0b / main.gs
Created January 17, 2022 23:06
Google Apps ScriptでGoogleカレンダーからGoogleスプレッドシートに作業時間を自動集計する
const CALLENDAR_ID = '<calendar_id>'
const SHEET_ID = '<sheet_id>'
function main() {
// 現在の年と月を取得
const [year, month] = getCurrentYearMonth();
// 月の開始時刻と終了時刻を取得
const [startTime, endTime] = getCurrentMonthTimes(year, month);
brew install emacs-plus --without-spacemacs-icon --with-emacs-27-branch \
--with-no-titlebar --with-no-frame-refocus --with-jansson --HEAD
#include <stdio.h>
#include <stdlib.h>
typedef struct _tree {
int value;
struct _tree *left;
struct _tree *right;
} Tree;
Tree *tree_init(int value) {
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define MAX_SIZE 10
//#define MAX_SIZE 1071
typedef struct _table {
int value;
char *key;
struct _table *next;
#include <iostream>
#include <functional>
#include <gtest/gtest.h>
#include <glog/logging.h>
using namespace std;
namespace myhash {
enum Status {
@sat0b
sat0b / rpn.c
Last active October 8, 2017 14:43
逆ポーランド記法
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
if (argc != 2) {
fprintf(stderr, "Usage %s equation\n", argv[0]);
exit(1);
}
#include <iostream>
#include <vector>
#include <Eigen/Core>
using namespace std;
using namespace Eigen;
int main() {
Matrix4d d4;
cout << "d4" << endl;
cout << d4 << endl;
#include <glog/logging.h>
void sample() {
CHECK_EQ(10, 20);
}
int main(int argc, char *argv[]) {
LOG(INFO) << "start!";
google::SetLogDestination(google::GLOG_INFO, ".");
google::InitGoogleLogging(argv[0]);
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
#include <boost/test/data/test_case.hpp>
#include <iostream>
#include <vector>
using namespace std;
BOOST_AUTO_TEST_CASE(sample_test) {
int a = 10;