The always enthusiastic and knowledgeable mr. @jasaltvik shared with our team an article on writing (good) Git commit messages: How to Write a Git Commit Message. This excellent article explains why good Git commit messages are important, and explains what constitutes a good commit message. I wholeheartedly agree with what @cbeams writes in his article. (Have you read it yet? If not, go read it now. I'll wait.) It's sensible stuff. So I decided to start following the
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
import rasterio.merge | |
bounds=None | |
res=None | |
nodata=None | |
precision=7 | |
def merge(input1,bounds, res, nodata, precision): | |
import warnings | |
warnings.warn("Deprecated; Use rasterio.merge instead", DeprecationWarning) |
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
git config -f ~/.gitconfig-work user.email <[email protected]> | |
git config -f ~/.gitconfig-work user.signingkey <your.signing.key> | |
git config --global "includeIf.gitdir:~/work/.path" "~/.gitconfig-work" |
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
def flatten(data): | |
"""Flatten a nested dict. | |
Args: | |
data (dict): The dictionary to flatten | |
Returns: | |
dict: Flattened dictionary | |
""" | |
out = {} |
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/sh | |
function install_wireguard () { | |
echo "Downloading Wireguard ($RELEASE)..." | |
FILENAME="wireguard-v2.0-$BOARD-$RELEASE.deb" | |
DEB_URL="https://github.com/Lochnair/vyatta-wireguard/releases/download/$RELEASE/$FILENAME" | |
if (/usr/bin/curl -s -L -o /tmp/$FILENAME $DEB_URL); then | |
echo "Installing $FILENAME..." | |
dpkg -i /tmp/$FILENAME | |
rm -f /tmp/$FILENAME |
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
{ | |
"data_version": "0.0.3", | |
"description": "Census England Household Schema", | |
"hub": { | |
"enabled": true | |
}, | |
"legal_basis": "Voluntary", | |
"metadata": [ | |
{ | |
"name": "user_id", |
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
## within current branch, squashes all commits that are ahead of master down into one | |
## useful if you merged with upstream in the middle of your commits (rebase could get very ugly if this is the case) | |
## commit any working changes on branch "mybranchname", then... | |
git checkout master | |
git checkout -b mybranchname_temp | |
git merge --squash mybranchname | |
git commit -am "Message describing all squashed commits" | |
git branch -m mybranchname mybranchname_unsquashed | |
git branch -m mybranchname |
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
with open("./day1_input.txt") as fp: | |
inputs = [int(line.strip("\n")) for line in fp.readlines()] | |
print(f"Answer: {sum(inputs)}") |
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
[ | |
{ | |
"repo": "sdx-ops", | |
"userName": "ONSDigital" | |
}, | |
{ | |
"repo": "sdx-evolution", | |
"userName": "ONSDigital" | |
}, | |
{ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.