Skip to content

Instantly share code, notes, and snippets.

View blueskyjunkie's full-sized avatar

Russell blueskyjunkie

View GitHub Profile
tc=lambda n, b: hex((1 << b)+n if n <0 else hex(n)

Keybase proof

I hereby claim:

  • I am blueskyjunkie on github.
  • I am blueskyjunkie (https://keybase.io/blueskyjunkie) on keybase.
  • I have a public key ASBSOtek01KdgEHDbPg6RJz5Vlu5-ghzU8nSsneR9L0Jvwo

To claim this, I am signing this object:

@blueskyjunkie
blueskyjunkie / changeDir.py
Created June 25, 2016 11:24
Use a 'with' block to temporarily change the working directory.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@blueskyjunkie
blueskyjunkie / leapSecond.py
Created June 24, 2016 12:04
Acquire current UTC leap second from Internet sources
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.