Skip to content

Instantly share code, notes, and snippets.

View orange634nty's full-sized avatar
🤔

orange634nty orange634nty

🤔
View GitHub Profile
const PRESENTATION_ID = "xxxpresentationidxxx"
const FOLDER_ID = "xxxfolderidxxx"
const DISOCRD_WEBHOOK_TOKEN = "xxxwebhooktokenxxx"
const DISCORD_WEBHOOK_URL = `https://discord.com/api/webhooks/xxxx/${DISOCRD_WEBHOOK_TOKEN}`
const main = () => {
const slide = SlidesApp.openById(PRESENTATION_ID).getSlides()[0]
const imgBlob = getImageBlob(slide, PRESENTATION_ID)
const file = DriveApp.getFolderById(FOLDER_ID).createFile(imgBlob).setName("date.png")
const imageUrl = updateAccessAndGetImageUrl(file)
@orange634nty
orange634nty / sample.gs
Last active December 12, 2020 09:29
SpreadSheet のデータを csv に変換して Google Drive に保存する GAS のコード
const SHEET_ID = "xxxxxxxxxxxxxxxxxxxxxx"
const FOLDER_ID = "xxxxxxxxxxxxxxxxxxxxxx"
// この関数を実行する
const convert = () => {
const sheets = SpreadsheetApp.openById(SHEET_ID).getSheets()
const folder = DriveApp.getFolderById(FOLDER_ID)
for (const sheet of sheets) {
saveAsJson(sheet, folder)
}
@orange634nty
orange634nty / Makefile
Created October 25, 2020 04:32
Marpを使うときに使ってるMakefile
help: ## ヘルプを表示します
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
build_html: ## Markdownからhtmlをビルドします
npx @marp-team/marp-cli silde.md
build_pdf: ## Markdownからpdfをビルドします
npx @marp-team/marp-cli silde.md --pdf
server: ## ローカルサーバーを起動させます
{
"name": "test-bycrypt",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"private": null,
"dependencies": {
"bcrypt": "^1.0.3"
}
}
require 'prime'
# ref: http://quanon.hateblo.jp/entry/2015/03/26/205949
# p, q は素数
# N = p * q
# L は p - 1 と q - 1 の最小公倍数
# 1 < E < L となり、E と L は互いに素となる任意の数
# 1 < D < L で E * D を L で割った時のあまりが1となる任意の数
# 適当に素数を見つける
@orange634nty
orange634nty / Makefile
Last active January 22, 2019 14:00
この記事で使用しているコード:https://qiita.com/orange634nty/items/7927634d471805e460fe
# Makefile
#### vagrant ####
# 仮想環境起動
vup:
vagrant up
vagrant ssh-config > ssh_config
# 仮想環境削除
@orange634nty
orange634nty / CallCommand.php
Created January 13, 2018 12:56
laravelコマンド実行方法比較
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use \Artisan;
class CallCommand extends Command
{
/**