Skip to content

Instantly share code, notes, and snippets.

Tim Bielawa tbielawa

Block or report user

Report or block tbielawa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:9201818
[~/rhat/juicer] 21:58:39 (repos_from_file)
$ git ds master
Makefile | 4 +-
bin/juicer | 3 +
bin/juicer-admin | 5 +-
docs/man/man1/juicer-admin.1 | 206 ++++++++++++++++++++++++++--
docs/man/man1/juicer-admin.1.asciidoc.in | 96 +++++++++++--
docs/man/man1/juicer.1 | 92 ++++++-------
docs/man/man1/juicer.1.asciidoc.in | 76 +++-------
docs/man/man5/juicer.conf.5 | 8 +-
View bigdiff.diff
diff --git a/Makefile b/Makefile
index be57177..5a59b31 100644
--- a/Makefile
+++ b/Makefile
@@ -171,6 +171,7 @@ rpm: rpmcommon
@find rpm-build -maxdepth 2 -name 'juicer*.rpm' | awk '{print " " $$1}'
@echo "#############################################"
+# This makes an RPM for Openshift Online
oorpm: rpmcommon
View juicer-admin.asciidoc

juicer-admin(1)

NAME

juicer-admin - manage pulp repositories, users, and roles.

View get_bitmath.sh
git clone https://github.com/tbielawa/bitmath.git
cd bitmath
make rpm
sudo rpm -ivh ./rpm-build/noarch/python-bitmath*.noarch.rpm
View bitmath-shell.py
>>> from bitmath import *
>>> four_mibibits = Mib(4)
>>> four_mibibits.to_kB()
kB(524.288)
>>> ninty_nine_bits = Bit(99)
>>> a_small_exbibyte = ninty_nine_bits.to_EiB()
@tbielawa
tbielawa / get_bitmath.sh
Last active Aug 29, 2015
How do I get bitmath: via RPM; via PyPi (pip); via setup/distutils? https://github.com/tbielawa/bitmath More information: https://blog.lnx.cx/?p=521
View get_bitmath.sh
########################################################################
# If you want it from PyPi:
$ sudo pip install bitmath
########################################################################
# If you like manual labor (and bleeding edge releases):
#
# clone that sweet sweet git repo:
$ git clone https://github.com/tbielawa/bitmath.git
$ cd bitmath
@tbielawa
tbielawa / megafrobber.py
Created Mar 16, 2014
How many times have you found yourself doing the same thing? Converting units without a standard library? Why don't we have something for that? My answer: https://github.com/tbielawa/bitmath now we do.
View megafrobber.py
def frob_account_quota(user):
user_quota_bytes = user.quota
user_quota_human_readable = user_quota_bytes / (1024 * 1024 * 1024)
print "%s has a quota of %s GB" % (user.name, user_quota_human_readable)
View bitmath-shell.py
>>> from bitmath import *
>>> GiB(42) * 3
GiB(126.0)
>>> Bit(9) + Byte(3)
Bit(33.0)
>>> exbi = EiB(0.6)
@tbielawa
tbielawa / 01-synaptics.conf
Created Mar 20, 2014
Tuning the Thinkpad T440s touchpad - See more at: https://blog.lnx.cx/?p=541
View 01-synaptics.conf
# /etc/X11/xorg.conf.d/01-synaptics.conf
Section "InputClass"
Identifier "t440 top buttons"
MatchDriver "synaptics"
# right btn|middle btn
Option "SoftButtonAreas" "60% 0 0 0 40% 60% 0 0"
Option "HorizHysteresis" "30"
Option "VertHysteresis" "30"
Option "PalmDetect" "1"
@tbielawa
tbielawa / python-bitmath.yum.info
Created Mar 27, 2014
python-bitmath - Now available in Fedora repositories! More at https://blog.lnx.cx/?p=550
View python-bitmath.yum.info
$ yum info python-bitmath
Available Packages
Name : python-bitmath
Arch : noarch
Version : 1.0.4
Release : 1.fc20
Size : 23 k
Repo : updates/20/x86_64
Summary : Aids representing and manipulating sizes in various prefix
: notations
You can’t perform that action at this time.