Skip to content

Instantly share code, notes, and snippets.

View bitsurgeon's full-sized avatar

Yongzhi bitsurgeon

View GitHub Profile
@bitsurgeon
bitsurgeon / docker_notes.md
Created November 4, 2020 11:36
frequent docker operations
## docker run
# [-d] run the container in detached mode, aka in the background
# [-p 80:80] map port 80 of the host to port 80 in the container
docker run -d -p 80:80 docker/getting-started

## docker build
# [-t] tag the image, a human-readable name for the final image
# [.] path to look for Dockerfile
docker build -t getting-started .
@bitsurgeon
bitsurgeon / tmux_notes.md
Last active November 4, 2020 11:35
frequent tmux operations

Frequent Operations

help

default prefix key

  • C-b

inline help

@bitsurgeon
bitsurgeon / 40_custom
Created October 1, 2019 05:53
Grub chainloading | Ubuntu -> RHEL
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
#
# replace <ESP_UUID> with the UUID of your ESP partition
# run 'sudo update-grub -o /boot/efi/EFI/ubuntu/grub.cfg'
menuentry "Chainload RHEL" {
@bitsurgeon
bitsurgeon / move_semantics.md
Created September 23, 2019 03:29
collection of links that explains C++ move semantics and rvalue references
@bitsurgeon
bitsurgeon / LICENSE
Last active September 5, 2019 02:01
BSD 3-Clause Clear License
The Clear BSD License
Copyright (c) [year] [fullname]
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted (subject to the limitations in the disclaimer below) provided that
the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
@bitsurgeon
bitsurgeon / nvidia.md
Last active April 5, 2024 03:35
install Nvidia driver on Ubuntu with Secure Boot

Install Nvidia Driver on Ubuntu 18.04.3

Secure Boot

This section applies to machines with Secure Boot, such as ThinkPad.

  1. Before installation, switch to "Discrete Graphics" in BIOS, if both Intel and Nvidia graphics are present.
  2. During installation, make sure to select the "Install third-party software for graphics and Wi-Fi hardware and addition media formats" in "Updates and other software" screen.
  3. Select "Configure Secure Boot", and set password.
  4. Continue Ubuntu installation as normal.
@bitsurgeon
bitsurgeon / environment.yml
Last active September 28, 2019 05:26
conda environment configuration for CarND
name: carnd
channels:
- defaults
- conda-forge
dependencies:
- python
- autopep8
- ffmpeg
- imageio
- ipython
@bitsurgeon
bitsurgeon / youtube.md
Last active April 15, 2024 16:46
Markdown cheatsheet for YouTube

Embed YouTube Video in Markdown File

  1. Markdown style
[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)
  1. HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">
@bitsurgeon
bitsurgeon / commit_template.txt
Last active November 16, 2021 23:42
Git cheatsheet
# **********************************************************************
# type: Summarize changes in around 50 characters or less
#
# More detailed explanatory text, if necessary. Wrap it to about 72
# characters or so. In some contexts, the first line is treated as the
# subject of the commit and the rest of the text as the body. The
# blank line separating the summary from the body is critical (unless
# you omit the body entirely); various tools like `log`, `shortlog`
# and `rebase` can get confused if you run the two together.
#
@bitsurgeon
bitsurgeon / conda.md
Last active July 3, 2019 15:31
conda cheatsheet

conda cheatsheet

# check version
conda --version

# update package
conda update conda
conda update <package>