Commands to get commit statistics for a Git repository from the command line -
using git log
, git shortlog
and friends.
This file contains hidden or 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
Optimize my Python code with detailed Sphinx-compatible docstrings. Follow these rules: | |
Adhere to PEP 8 guidelines. | |
Use descriptive variable names and efficient algorithms. | |
Minimize unnecessary computations and consider caching. | |
Write Google-style docstrings with detailed descriptions, parameter documentation, and return types. | |
Use Sphinx-specific directives like :param, :return, and :raises. | |
Include type hints for function parameters and return types. | |
Keep functions short, focused, and well-tested. | |
Use meaningful variable names, commit messages, and docstring updates. | |
Generate code that is readable, maintainable, and suitable for Sphinx documentation output. |
This file contains hidden or 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
name: SpellCheck | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: |
This file contains hidden or 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
# Install vsce | |
npm install -g @vscode/vsce\n | |
cd extensionfolder | |
vsce package | |
# Note: To get this to work on src/extenson.tsx source I needed to | |
# change it to src/extension.js. I haven't had time to debug it properly. | |
# This should create a (extention).vsix file in the root folder. | |
# Open command pallet (F1 on Mac) | |
# Find the command - Extensions: Install from VSIX... | |
# Navigate to (extension).vsix file in root. |
This file contains hidden or 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
# Commands I always forget. | |
podman build -f Dockerfile # You can use Buildfile for pure Podman. | |
podman images | |
podman tag 511541e4cde3 buck2-podman:latest | |
podman run -it buck2-podman bash | |
podman ps # copy the container id from another shell | |
podman commit eb1af8df2371 | |
podman images | |
podman ps # grab the name from the Names column. |
This file contains hidden or 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 Dockerfile will create an image | |
# with the Buck2 repo on Ubuntu. It will | |
# build and install Buck2 on the image | |
# and it will add the buck2 binary | |
# to the image path. | |
# | |
# To use this, copy the Dockerfile | |
# to a folder, then cd to the | |
# folder and run: | |
# |
This file contains hidden or 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
#!/bin/bash | |
gource \ | |
-s .03 \ | |
-1280x720 \ | |
--auto-skip-seconds .1 \ | |
--multi-sampling \ | |
--stop-at-end \ | |
--key \ | |
--highlight-users \ |
This file contains hidden or 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
"""Convert jupyter notebook to sphinx gallery notebook styled examples. | |
Usage: python ipynb_to_gallery.py <notebook.ipynb> | |
Dependencies: | |
pypandoc: install using `pip install pypandoc` | |
""" | |
import pypandoc as pdoc | |
import json |
In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
This file contains hidden or 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
# 1.install gource using HomeBrew | |
$ brew install gource | |
# 2.install avconv | |
git clone git://git.libav.org/libav.git | |
cd libav | |
# it will take 3-5 minutes to complie, be patient. | |
./configure --disable-yasm | |
make && make install |
NewerOlder