This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'cbor' | |
# Assume that the cbor-diag gem is installed, but don't use it directly | |
def pretty(item) | |
IO.popen("cbor2pretty.rb", "wb") {|io| io.write(item)} | |
end | |
puts "# Show that the default Time representation is Tag 1" | |
t = Time.now |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
require "cbor" unless defined? CBOR | |
module CBOR | |
module Canonical | |
module Object_Canonical_CBOR | |
def cbor_pre_canonicalize | |
self |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Verifying that +cabocabo is my blockchain ID. https://onename.com/cabocabo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun german-time () | |
(format-time-string "%d.%m.%Y" (current-time))) | |
(defun iso-date () | |
(format-time-string "%Y-%m-%d" (current-time))) | |
(defun ins-time (&optional arg) | |
(interactive "*P") | |
(if arg | |
(insert (german-time)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function scu() { | |
local fn=$1 | |
shift | |
echo opening /dev/cu."$fn" "$@"... | |
screen /dev/cu."${fn// / }" "$@" ; stty sane | |
} | |
function _scu() { | |
local cur="${COMP_WORDS[COMP_CWORD]}" | |
case "$cur" in | |
[0-9]*) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# put this in your ~/.screenrc to make | |
# ^A D (uppercase) switch on, and | |
# ^A U (uppercase) switch off, converting | |
# CR (return keys) input into CRLF | |
bind D bindkey "\015" stuff "\015\012" | |
bind U bindkey "\015" stuff "\015" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
MULT = { "" => 1, | |
"B" => 1, | |
"K" => 1024, | |
"M" => 1024*1024, | |
"G" => 1024*1024*1024, | |
"T" => 1024*1024*1024*1024, | |
} | |
def hrtonum(s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "System Preferences" | |
activate | |
set the current pane to pane id "com.apple.preference.universalaccess" | |
tell application "System Events" | |
tell process "System Preferences" | |
tell window "Accessibility" | |
tell checkbox named "Use grayscale" | |
click | |
end tell | |
end tell |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defconst elixir--cabo-prettify-symbols-alist | |
'( | |
("->" . ?➙) ; → ➜➽➤ | |
("::" . ?∷) | |
("<-" . ?⬅) ; ← | |
("<<" . ?⟪ ) ; «≪ | |
("=>" . ?⇒) | |
(">>" . ?⟫ ) ; »≫ | |
("do" . ?⫷) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OPEN=$(word 1, $(wildcard /usr/bin/xdg-open /usr/bin/open /bin/echo)) |