sudo apt-get install python3-pip
sudo pip3 install virtualenv
| import { Node, mergeAttributes } from "@tiptap/core"; | |
| import { NodeViewWrapper, ReactNodeViewRenderer } from "@tiptap/react"; | |
| import { Tldraw } from "@tldraw/tldraw"; // use @tldraw/tldraw@canary | |
| import "@tldraw/tldraw/tldraw.css"; | |
| function Component() { | |
| return ( | |
| <NodeViewWrapper className="react-component"> | |
| <div style={{ width: "100%", height: 500 }}> | |
| <Tldraw /> |
| .ProseMirror[data-placeholder]::before { | |
| color: global.$placeholder-colour; | |
| position: absolute; | |
| content: attr(data-placeholder); | |
| pointer-events: none; | |
| } |
| go mod edit -module {NEW_MODULE_NAME} | |
| -- rename all imported module | |
| find . -type f -name '*.go' \ | |
| -exec sed -i -e 's,{OLD_MODULE},{NEW_MODULE},g' {} \; |
| ffmpeg -f lavfi -i anullsrc=r=11025:cl=mono -t <number of seconds> -acodec aac out.m4a |
| package ffmpeg | |
| import ( | |
| "bytes" | |
| "context" | |
| "io" | |
| "os" | |
| "os/exec" | |
| "strings" | |
| "testing" |
| // $ node queue <file name or youtube URL> | |
| const net = require('net') | |
| let client = net.connect(1234, 'localhost') | |
| client.on('connect', function () { | |
| if (process.argv[2]) { | |
| console.log('Queueing ' + process.argv[2]) | |
| client.write('queue.push smart:' + process.argv[2] + '\r\n') | |
| } |
| #!/bin/bash | |
| USER=${1:-sebble} | |
| STARS=$(curl -sI https://api.github.com/users/$USER/starred?per_page=1|egrep '^Link'|egrep -o 'page=[0-9]+'|tail -1|cut -c6-) | |
| PAGES=$((658/100+1)) | |
| echo You have $STARS starred repositories. | |
| echo |
| package main | |
| import ( | |
| "encoding/json" | |
| "net/http" | |
| "net/url" | |
| "golang.org/x/net/html" | |
| "io" | |
| ) |