This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; EDITOR='emacsclient -t' とか EDITOR='emacsclient -c' で | |
;; git commit -a した時に意図しない差分が表示されるのを回避 | |
(defun magit-commit-diff-with-frame-environment () | |
(let ((process-environment | |
(append process-environment | |
(frame-parameter nil 'environment)))) | |
(magit-commit-diff))) | |
(with-eval-after-load 'magit-commit | |
(remove-hook 'server-switch-hook #'magit-commit-diff) | |
(add-hook 'server-switch-hook #'magit-commit-diff-with-frame-environment)) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import argparse | |
import base64 | |
import hashlib | |
import hmac | |
import os | |
def match(line, hostname): | |
host_str = line.split(' ')[0] |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' Create Zoom Meeting shortcut | |
Option Explicit | |
Dim meetingId | |
meetingId = InputBox("Enter Meeting ID") | |
If IsEmpty(meetingId) Or meetingId = "" Then | |
WScript.Quit | |
End If | |
Dim passCode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: Create Zoom Meeting shortcut | |
:: If you have your organization's domain name, rename this file as follows: | |
:: create_zoom_shortcut_{domain}.bat | |
echo off | |
:: file name without extension | |
set SCRIPT_NAME=%~n0 | |
:: remove "create_zoom_shortcut_" | |
set DOMAIN=%SCRIPT_NAME:~21% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Convert truecolor escape sequence to 256 color escape sequence | |
* \x1b[38;2;{red};{green};{blue}m -> \x1b[38;5;{color}m (foreground) | |
* \x1b[48;2;{red};{green};{blue}m -> \x1b[48;5;{color}m (background) | |
where 0 <= red, green, blue <= 255 represents 24-bit color | |
and 16 <= color <= 231 | |
The logic is based on the colour_find_rgb() in tmux/colour.c | |
Original copyright notice is: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Gitのデータ構造についての入門演習 | |
# 履歴管理について | |
# 三種類のGitオブジェクト commit, tree, blobが現れます。 | |
mkdir git-test-repository | |
cd $_ | |
git init | |
ls .git | |
find .git/objects -type f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# usage: | |
# git-list-conflicts.sh | |
# git-list-conflicts.sh branch-name | |
# git-list-conflicts.sh revison-begin..revision-end | |
git log --merges --pretty=tformat:%H $@ | while read COMMIT ; do | |
PARENTS=$(git log -1 --pretty=tformat:%P ${COMMIT}) | |
git checkout ${COMMIT}~1 2>/dev/null | |
git merge --no-commit $(echo ${PARENTS} | cut -f 2- -d" ") >/dev/null 2>&1 | |
if [ $? -ne 0 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import curses | |
def count(data, x, y): | |
c = 0 | |
if x > 0: | |
c += data[x-1][y] | |
if y > 0: | |
c += data[x-1][y-1] | |
if y < len(data[x]) - 1: |
NewerOlder