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
#!/usr/bin/python3 | |
import numpy as np | |
from numpy.lib.stride_tricks import as_strided | |
from PIL import Image | |
infilename = "/tmp/foo/xac" | |
inwidth = 3280 | |
inheight = 2464 | |
bitspp = 10 |
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
#!/usr/bin/env python3 | |
# SPDX-License-Identifier: MIT | |
# | |
# mk can be used to easily store and run multiple build profiles. For example, I | |
# work on U-Boot at $DAYJOB and I need to run builds for 3-4 different | |
# platforms. Each platform first needs a defconfig and then a build. And the | |
# build command is slightly different for each. So I wrote this small utility to | |
# store a set of build commands and the currently active set. | |
# | |
# The commands are stored in the "config" format. For example, create a .mkconf |
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
#!/usr/bin/env bash | |
# SPDX-License-Identifier: MIT | |
# Example usage: mark_backport.sh upstream/master | |
# | |
# If the upstream branch has too many commits this can be very slow. In this | |
# case, pass other arguments to limit the git log to contain all your commits. | |
# For example, you are use '--author' or pathspecs. Example with pathspecs: | |
# mark_backport.sh upstream/master -- drivers/spi |
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
#!/usr/bin/env tclsh | |
if {$argc > 2} { | |
puts "More arguments than expected" | |
exit 1 | |
} | |
set dirname [lindex $argv 0] | |
# Create the target directory if it doesn't already exist. |
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 | |
function find_globals () { | |
cut_content="$1" | |
# Find all the global declarations | |
globals=$(echo "$cut_content" | grep '^[[:space:]]global ' | sed 's/\s*global //') | |
if test -z "$globals"; then | |
return |
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 stuff I want to do some time in the future: | |
[Git gui] | |
- Edit tools. | |
- Context menu on file list. | |
- Fix revert hunk and revert lines not working on added files (files that have | |
the flag A, not M). | |
- Add selective staging for added files. | |
- Add a newline in the commit editor on 80 cols. | |
- Configurable key bindings? |
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 | |
# This script is used to save a list of emails from neomutt's pipe. Be sure to | |
# set pipe_split in neomutt. | |
# | |
# Pass the directory name as the first argument. The email content is expected | |
# to be in stdin. | |
# | |
# The second argument is optional. It can be used to force the patch version to | |
# be something else. For example, pass v3 as the second argument. Even if 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
#!/bin/bash | |
RED=$(tput setaf 1) | |
NORMAL=$(tput sgr0) | |
# FIXME: I am using porcelain commands to do plumbing work. Maybe fix it in the | |
# future. | |
AUTHOR=$(git --no-pager show -s --format='%aN <%aE>') | |
COMMIT_MSG=$(git --no-pager show -s --format='%B') | |
COMMIT_ID=$(git --no-pager show -s --format='%h') |
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
#!/usr/bin/sh | |
. git-sh-setup | |
# Add a Signed-off-by by me when applying patches. Only do this for projects | |
# you are the maintainer of, and need to add your signoff before pushing out. | |
SOB=$(git var GIT_AUTHOR_IDENT | sed -n 's/^\(.*>\).*$/Signed-off-by: \1/p') | |
grep -qs "^$SOB" "$1" || echo "$SOB" >> "$1" |
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 | |
xdg-screensaver lock | |
sleep 0.7 | |
xdotool key Ctrl |
NewerOlder