| #!/usr/bin/env python3.6 | |
| # Author: David Chin [email protected] | |
| import sys | |
| import os | |
| import shlex | |
| import subprocess | |
| import argparse | |
| import datetime | |
| import calendar | |
| from pathlib import Path |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
- There are always 24 hours in a day.
- February is always 28 days long.
- Any 24-hour period will always begin and end in the same day (or week, or month).
- Create the directory for the flexlm user to use, e.g.,
/opt/flexlm - Place all the binaries for the licence manager and the licence in a vendor specific subdirectory
At this point you should have something similar to following directory structure:
/opt/flexlm/
└── VENDOR
| """ | |
| pybble.py | |
| Yup, you can run Python on your Pebble too! Go thank the good folks who | |
| made Transcrypt, a dead-simple way to take your Python code and translate | |
| it to *very* lean Javascript. In our case, instead of browser, we run it | |
| on Pebble using their equally dead-simple Online IDE and Pebble.js library. | |
| Here's a working example, it runs on a real Pebble Classic. |
| SPC s c remove highlight | |
| **** Files manipulations key bindings | |
| Files manipulation commands (start with ~f~): | |
| | Key Binding | Description | | |
| |-------------+----------------------------------------------------------------| | |
| | ~SPC f c~ | copy current file to a different location | | |
| | ~SPC f C d~ | convert file from unix to dos encoding | | |
| | ~SPC f C u~ | convert file from dos to unix encoding | |
Requirement: Chromebook, Common Sense, Commandline Ablity, 1 hour of time
Dear developers with a spare Chromebook lets inject a little personalization into your Crosh shell with custom fonts, the solarized theme, and extra secure shell options.
Also, keep in mind that the terms Chrosh, Chrosh Window, and Secure Shell all refer to various versions and extentions built around the ChromeOS terminal. Settings that affect the ChromeOS terminal are global.
| ; ___ _ __ ___ __ ___ | |
| ; / __|_ _ __ _| |_____ / /| __|/ \_ ) | |
| ; \__ \ ' \/ _` | / / -_) _ \__ \ () / / | |
| ; |___/_||_\__,_|_\_\___\___/___/\__/___| | |
| ; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial | |
| ; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself | |
| ; to learn a little bit about assembly. I **think** I understood everything, but I may | |
| ; also be completely wrong :-) |
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
| ## Concepts incorporated from: | |
| ## http://stuckinadoloop.wordpress.com/2011/06/15/puppet-managed-deployment-of-selinux-modules/ | |
| define selinux::module( | |
| $ensure = 'present', | |
| $mod_dir = '/usr/share/selinux', | |
| $source | |
| ) { | |
| # Set Resource Defaults | |
| File { |