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
// Initialize an empty image | |
dest := image.NewRGBA(image.Rect(0, 0, 800, 300)) | |
// Draw a white background | |
draw.Draw(dest, dest.Bounds(), &image.Uniform{color.White}, image.ZP, draw.Src) | |
// Read the font | |
fontBytes, err := ioutil.ReadFile(exeDir + "/DejaVuSans.ttf") | |
if err != nil { |
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
## /etc/X11/xorg.conf.d/10-evdev.conf | |
## Disable laptop's built-in keyboard (in X session) | |
## Does not disable on the kernel level | |
## Does not disable while ctrl+alt+f1 etc | |
## Useful for placing a USB keyboard on top of laptop's (broken) keyboard as to not accidentally input keys. | |
## <aerth@riseup.net> | |
## | |
## You may have to create the xorg.conf.d directory. | |
## Something like: | |
## mkdir-p /etc/X11/xorg.conf.d |
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
set disable-randomization off | |
set $_exitcode = -999 | |
set height 0 | |
handle SIGTERM nostop print pass | |
handle SIGPIPE nostop | |
define hook-stop | |
if $_exitcode != -999 | |
quit | |
else | |
shell echo | mail -s "NOTICE: app has stopped on unhandled signal" root |
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
echo "# Contributors" > CONTRIBUTORS.md && git log --pretty=tformat:"* %an <%ae>" | tac | awk ' !x[$0]++' >> CONTRIBUTORS.md |
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
echo "# Contributors" > CONTRIBUTORS.md && git log --pretty=tformat:"* %an <%ae>" | tac | awk ' !x[$0]++' >> CONTRIBUTORS.md |