#ローカルとリモートのブランチ名を変更する
以下、ブランチ名を hoge から foo に変更する例
- ローカルのブランチ名変更
git branch -m hoge foo
- リモートのブランチを消す
テストだよ |
{ | |
"type": "array", | |
"items": { | |
"$ref": "#/$defs/table" | |
}, | |
"$defs": { | |
"table": { | |
"name": "table", | |
"type": "object", | |
"properties": { |
import http from "http"; | |
import fs from "fs"; | |
import path from "path"; | |
import { fileURLToPath } from 'url'; | |
const __filename = fileURLToPath(import.meta.url); | |
const __dirname = path.dirname(__filename); | |
const server = http.createServer((req, res) => { | |
const reqPath = req.url; | |
const sanitizedPath = path.normalize(reqPath).replace(/^(\.\.[\/\\])+/, ''); |
#ローカルとリモートのブランチ名を変更する
以下、ブランチ名を hoge から foo に変更する例
git branch -m hoge foo
function getBitsAfter33(ipv6) { | |
function hexTo2Bits(v, bitLength = 4) { | |
if(v >= 10) { | |
v = "ABCDEF"[v - 10] | |
} | |
return (new Array(bitLength).fill("0").join("") + parseInt(v, 16).toString(2)).slice(-bitLength); | |
} | |
function bit2toHex(num) { | |
var p = num.split("").reverse().map((v, i) => Math.pow(2, i) * parseInt(v)).reduce((memo, v) => memo + v, 0); | |
if(p < 10) { |
function retryFetch(url) { | |
var lastError = null; | |
for(var i = 0; i < 3; i++) { | |
try { | |
var res = UrlFetchApp.fetch(url) | |
if(res.getResponseCode() == 200) { | |
return res.getContentText("UTF-8") | |
} else { | |
lastError = 'HTTPステータスコードが200以外: ' + res.getResponseCode() + ', ' + url; | |
} |
/** | |
* @param {string} text | |
* @param { {server: string, token: string} } options options.serverはたとえば"misskey.io" | |
*/ | |
function postToMisskey(text, options) { | |
return UrlFetchApp.fetch( | |
`https://${options.server}/api/notes/create`, | |
{ | |
'method': 'POST', | |
'headers' : {'Content-Type': 'application/json'}, |
// いい感じに同期します | |
// 新規タスクの追加 | |
// 変更点の更新 | |
// GoogleTasksの読み込み | |
function update() { | |
new MainService().update(); | |
} | |
function onOpen() { | |
const customMenu = SpreadsheetApp.getUi() |
function exportCalendarEvents() { | |
// カレンダーIDを入力してください | |
var calendarId = "primary"; | |
// フォーマット | |
var format = "yyyy/MM/dd HH:mm:ss"; | |
// 今日の日付を取得 | |
var today = new Date(); | |
// 今日の0時0分0秒を計算 | |
var startOfDay = new Date(today.getFullYear(), today.getMonth(), today.getDate()); |
const headers = ["ID", "タスク名", "開始日", "終了日", "日数", "依存タスク"]; | |
function setup() { | |
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("シート1"); | |
if(sheet.getRange(1, 1).getValue() == "入力用") { | |
throw new Error("すでに実行済みです"); | |
} | |
sheet.appendRow(["入力用"]) | |
sheet.appendRow(headers) | |