Skip to content

Instantly share code, notes, and snippets.

@shiopon01
shiopon01 / keybindings.json
Created February 5, 2025 17:36
Cursor keybindings.json
// Place your key bindings in this file to override the defaults
[
{
"key": "shift+cmd+k",
"command": "-composer.openAsBar"
},
{
"key": "shift+cmd+k",
"command": "-aipopup.action.modal.generate",
"when": "editorFocus && !composerBarIsVisible"
@shiopon01
shiopon01 / sample---hello-md
Last active May 10, 2023 17:16
code-snippet-final
aa
@shiopon01
shiopon01 / code-snippet
Last active May 10, 2023 16:52
code-snippet
‎‎​
@shiopon01
shiopon01 / Create file in Inbox.md
Created October 6, 2021 15:34
Obsidian Templaterを使用して指定フォルダ内に連番のファイルを作成する

<%* const title = await tp.system.prompt("Enter title"); if (!title) { return; } const inbox = "Inbox/Inbox.md"; const inboxFile = this.app.vault.getAbstractFileByPath(inbox); const inboxContent = await this.app.vault.read(inboxFile); const nextNo = String(Number(inboxContent) + 1).padStart(4, "0");

package main
import (
"fmt"
"strings"
)
type Pair struct {
x, y int
}
package main
import (
"fmt"
)
type Hoges []struct {
value string
}
package main
import "fmt"
func main() {
var n int
fmt.Scan(&n)
a := make([]int, n)
for i := 0; i < n; i++ {
fmt.Scan(&a[i])
@shiopon01
shiopon01 / kubernetes-jenkins.yaml
Created June 21, 2019 05:59
kubernetes-jenkins.yaml
# ------------------- Jenkins ReplicationController ------------------- #
apiVersion: v1
kind: ReplicationController
metadata:
name: jenkins
spec:
replicas: 1
selector:
app: jenkins-app
@shiopon01
shiopon01 / git-prompt
Last active March 8, 2019 07:14
branch表示リロードされないかも
## Git-Prompt
if [ -f $HOME/rc/git-completion.bash ] && [ -f $HOME/rc/git-prompt.sh ]; then
source $HOME/rc/bash/git-completion.bash
source $HOME/rc/bash/git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
GIT_PS1_SHOWSTASHSTATE=true
GIT_PS1_SHOWUPSTREAM=auto
fi