docker run --name <your_container_name> alpine/git <git_command>
docker run -it --name <your_container_name> alpine/git <git_command>
: Run with tty interactivedocker run -d --name couch -p 8091-8094:8091-8094 -p 11210:11210 couchbase
: Run (e.g. a server) unattacheddocker cp container_name:/git/getting-started .
: Copy files/folders between a container and the local filesystemdocker start <your_container_name>
: Start a stopped containerdocker attach <your_container_name>
: Attach to running container
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
namespace CSharpServer | |
{ |
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
Show hidden characters
{ | |
"cmd": ["pandoc --pdf-engine=xelatex --filter=pandoc-citeproc -o '$file_base_name.pdf' '$file_name'"], | |
"selector": "text.html.markdown", | |
"shell": true | |
} |
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
# This is VERY INEFFICIENT - at the moment for 10min video it produces 10*60*25=15000 images | |
# The framerate calculation is WRONG: it's NOT taking screenshots every 10 frames, but it's taking every frame! | |
# In fact, it's faster and more efficient if we just re-watch the video in VLC and use Alt-V-S shortcut to take screenshots when needed | |
import cv2 | |
vidcap = cv2.VideoCapture('temp.mp4') | |
framerate = vidcap.get(cv2.CAP_PROP_FPS) | |
success,image = vidcap.read() | |
count = 0 |
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
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace RegRename | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |
Notes for Dwarf Fortress, reminders of some things I tend to forget.
We play with Vanilla! It lacks the sound effect and Dwarf Therapist but is otherwise most integrated, feels natural, and had little distraction.
- Minecraft Java Edition - E.g. 1.17
- Forge - E.g. 1.17
- OptiFine - E.g. 1.17
- Download shaders (.zip) to put inside OptiFine folder: https://wiki.shaderlabs.org/wiki/Shaderpacks
Ctrl+-
: Go to last cursor location (navigate back); Same effect if one has "Navigate back" mouse button;Alt+F12
: Peek definition; Press again to peek declaration;Ctrl+K, O
: Switch between header and cpp file;Ctrl+K, R
: Find all references;Alt+*
: Go (back to) current debug line;F9
: Toggle breakpoint
Assume VS 2019 style shortcut preset.
- (Feature)
Ctrl+T
for Search Everywhere for symbols and definitions, which is different from Search from Files (Ctrl+Shift+F
); - (Code Navigation)
Alt+Shift+L
: Navigate to file in solution explorer;
OlderNewer