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
# bitbucket-pipelines.yml | |
image: python:3.11 | |
pipelines: | |
branches: | |
test/*: | |
- step: | |
name: Format checking with black | |
script: | |
- pip install black |
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
set -g default-terminal "xterm-256color" | |
unbind C-b | |
set -g prefix C-g | |
bind C-g send-prefix | |
bind \\ split-window -h | |
bind - split-window -v | |
setw -g mode-keys vi | |
bind-key -T copy-mode-vi 'v' send -X begin-selection |
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
void prints(const char *format, ...) | |
{ | |
va_list args; | |
va_start(args, format); | |
int length = vsnprintf(NULL, 0, format, args) + 1; | |
char buffer[length]; | |
vsnprintf(buffer, length, format, args); |
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
#include <stdio.h> | |
enum | |
{ | |
TABLESIZE = 10 | |
}; | |
static int table[TABLESIZE] = {12, 14, 16, 77, 65}; | |
int *f(size_t index) |
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
#include <stdio.h> | |
#include "queue.h" | |
int main(void) | |
{ | |
QUEUE_T *q = create_queue(4); | |
q->push(q, 'a'); | |
q->push(q, 'b'); | |
q->push(q, 'c'); |
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 filter-branch --env-filter ' | |
OLD_EMAIL="OLD_EMAIL" | |
CORRECT_NAME="FUKUMOTO Yuki" | |
CORRECT_EMAIL="rk76fewf@gmail.com" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" | |
fi | |
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] |
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
void setCN(void) | |
{ | |
_CNIE = 1; // 割り込みを有効化 | |
_CNIF = 0; // 割り込みのフラグを下げる | |
_CNIP = 1; // 割り込み優先度の設定 | |
_CN83IE = 1; // CN83PINの割り込みを有効化 | |
_CN23IE = 1; // CN24PINの割り込みを有効化 | |
_CN22IE = 1; // CN22PINの割り込みを有効化 | |
_CN55IE = 1; // CN55PINの割り込みを有効化 |
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
void setCN(void) | |
{ | |
_CNIE = 1; // 割り込みを有効化 | |
_CNIF = 0; // 割り込みのフラグを下げる | |
_CNIP = 1; // 割り込み優先度の設定 | |
_CN83IE = 1; // 左上のリミットスイッチの割り込みを有効化 | |
_CN23IE = 1; // 左下のリミットスイッチの割り込みを有効化 | |
_CN22IE = 1; // 右上のリミットスイッチの割り込みを有効化 | |
_CN55IE = 1; // 右下のリミットスイッチの割り込みを有効化 |
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
void setUART() | |
{ | |
// UARTのピンの設定 | |
_TRISD0 = 1; // RX | |
_TRISD11 = 0; // TX | |
_U1RXR = 11; // RX | |
_RP12R = 3; // TX | |
// UARTモジュールの設定 | |
U1MODE = 0x0000; |
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
alias ls='ls -GF' | |
alias ll='ls -GF -l' | |
alias grep='grep --color=auto' | |
alias ..='cd ..' | |
alias vim='nvim' | |
alias x='exit' | |
alias g++='g++-11' | |
alias pip='pip3' | |
alias g='git' |
NewerOlder