I hereby claim:
- I am j05h on github.
- I am j05h (https://keybase.io/j05h) on keybase.
- I have a public key ASD_v_EDxCewtVXpXod5dkFP97QtiZsec5DC8pxbBkPHLAo
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
# Super lame because I'm not even using optparse. Killme. | |
# gitstats.rb from-date to-date | |
# Will find the commit stats for all developers on a project within those dates. | |
# Example: | |
# gitstats.rb 2019-03-22 2019-04-01 | |
# gets all stats betwee the above dates exclusive. | |
from = ARGV.shift |
I hereby claim:
To claim this, I am signing this object:
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width"/> | |
<style> | |
/********************************************** | |
* Ink v1.0.5 - Copyright 2013 ZURB Inc * | |
**********************************************/ | |
/* Client-specific Styles & Reset */ |
def detect_encoding file | |
result = `file --mime-encoding #{file}` | |
_, encoding = result.split | |
if File.exists? file | |
return encoding unless encoding.nil? || encoding.empty? | |
end | |
end |
# AppleScript to change the keyboard modifier settings. Yosemite doesn't remember these | |
# and reverts whenever you plug in a new keyboard. | |
# Options on the pane go from bottom to top of the window (at least in this case) | |
# If you use this, load it up in to Script Editor, run it. Assuming it works, | |
# Export to an application and save to the desktop. From there, you can execute | |
#x-help-script://com.apple.machelp/scpt/OpnPrefsBndID.scpt?com.apple.preference.keyboard | |
tell application "System Preferences" | |
activate | |
set current pane to pane "com.apple.preference.keyboard" |
(* | |
Determine how much time you spend in meetings over a month | |
*) | |
on sortEvents(theList) | |
-- if there's only one event then it is, by definition, sorted | |
if (count theList) = 1 then return theList | |
-- if we get here we have more than 2 items, so iterate through them | |
set sorted to false -- assume they're out of order | |
repeat until sorted = true |
"""""""""""""""" Functions """""""""""""""" | |
function! <SID>StripTrailingWhitespaces() | |
" Preparation: save last search, and cursor position. | |
let _s=@/ | |
let l = line(".") | |
let c = col(".") | |
" Do the business: | |
%s/\s\+$//e | |
" Clean up: restore previous search history, and cursor position | |
let @/=_s |
$ nova list | awk 'BEGIN {FS="[|=,]"} {gsub(/[[:space:]]+/,"",$3);gsub(/[[:space:]]+/,"",$6); print $6" "$3}' | tail -n +3 | grep 10 | |
10.1.1.141 Server2592 | |
10.1.1.136 Server2598 | |
10.1.1.140 Server2599 | |
10.1.1.138 Server2600 | |
10.1.1.143 Server2601 | |
10.1.1.147 Server2602 |
Array.new.tap do |a| | |
# Break the directory into pieces for recursive creation. | |
# ["/opt", "MegaRAID", "MegaCli"] | |
parts = node['megaraidcli']['dir'].scan(/^\/(?:[a-zA-Z]+)|(?:[a-zA-Z]+)/) | |
parts.each do |parts| | |
a << parts | |
directory a.join(::File::SEPARATOR) do | |
owner "root" | |
group "root" |
Array.new.tap do |a| | |
# Break the directory into pieces for recursive creation. | |
# ["/opt", "MegaRAID", "MegaCli"] | |
parts = node['megaraidcli']['dir'].scan(/^\/(?:[a-zA-Z]+)|(?:[a-zA-Z]+)/) | |
parts.each do |parts| | |
a << parts | |
directory a.join(::File::SEPARATOR) do | |
owner "root" | |
group "root" |