This file contains 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 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 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 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 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 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 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 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 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)) |
This file contains 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
Let's see where we don't agree (this code doesn't do purge_nulls): | |
Mismatch: | |
orig: {"a":"foo","b":[3,null,{"x":null}]} | |
patch: {"b":[3,null,{"x":null}]} | |
draft: {"a":"foo","b":[3,{}]} | |
actual: {"a":"foo","b":[3,null,{"x":null}]} | |
Mismatch: | |
orig: [1,2] | |
patch: [1,null,3] | |
draft: [1,3] |