Count number of lines in a git working tree
git diff --shortstat `git hash-object -t tree /dev/null`
Current branch name
git rev-parse --abbrev-ref HEAD
Gets current sort hash
git rev-parse --short HEAD
| #!/usr/bin/python | |
| # Author: Kurt Jacobson | |
| # Date: 04/15/17 | |
| # Email: [email protected] | |
| # License: GPL | |
| # DESCRIPTION | |
| # Userspace HAL component for LinuxCNC that creates two HAL pins | |
| # indicating the current G20/G21 state |
| #!/usr/bin/env python | |
| # Copyright (c) 2017 Kurt Jacobson | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <style-scheme id="kcj" _name="KCJ" version="1.0"> | |
| <author>Kurt Jacobson</author> | |
| <_description></_description> | |
| <!-- COLORS --> | |
| <color name="comment_color" value="#608b4e"/> | |
| <color name="number_color" value="#b5cea8"/> | |
| <color name="string_color" value="#d69d62"/> |
| # If you change this file, run 'update-grub' afterwards to update | |
| # /boot/grub/grub.cfg. | |
| # For full documentation of the options in this file, see: | |
| # info -f grub -n 'Simple configuration' | |
| GRUB_DEFAULT="Previous Linux versions>Ubuntu, with Linux 3.4-9-rtai-686-pae" | |
| GRUB_HIDDEN_TIMEOUT=0 | |
| GRUB_HIDDEN_TIMEOUT_QUIET=true | |
| GRUB_TIMEOUT=3 | |
| GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` |
| #include <gtk/gtk.h> | |
| // Source: | |
| // http://www.linuxforums.org/forum/programming-scripting/117713-gtk-moving-widget-mouse-post906490.html#post906490 | |
| // higher values make movement more performant | |
| // lower values make movement smoother | |
| const gint Sensitivity = 1; | |
| const gint EvMask = GDK_BUTTON_PRESS_MASK | GDK_BUTTON1_MOTION_MASK; |
| #!/usr/bin/env python | |
| # Copyright (c) 2017 Kurt Jacobson | |
| # License: https://kcj.mit-license.org/@2017 | |
| import os | |
| import sys | |
| import mimetypes | |
| try: |
| #!/usr/bin/env python | |
| import gi | |
| gi.require_version('Gtk', '3.0') | |
| from gi.repository import Gtk | |
| class MoveButton(Gtk.Fixed): | |
| def __init__(self): |
| #!/usr/bin/env python | |
| # Copyright (c) 2017 Kurt Jacobson | |
| # License: https://kcj.mit-license.org/@2017 | |
| import os | |
| import gi | |
| gi.require_version('Gtk', '3.0') | |
| gi.require_version('Gdk', '3.0') |