Skip to content

Instantly share code, notes, and snippets.

@hyperqube
hyperqube / zeromq-vs-redis.md
Created January 7, 2024 14:23 — forked from hmartiro/zeromq-vs-redis.md
Comparison of ZeroMQ and Redis for a robot control platform

ZeroMQ vs Redis

This document is research for the selection of a communication platform for robot-net.

Goal

The purpose of this component is to enable rapid, reliable, and elegant communication between the various nodes of the network, including controllers, sensors, and actuators (robot drivers). It will act as the core of robot-net to create a standardized infrastructure for robot control.

Requirements:

@hyperqube
hyperqube / brew-list.sh
Created May 30, 2020 18:17 — forked from eguven/brew-list.sh
List all packages installed using Homebrew and their sizes
brew list -f1 | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
@hyperqube
hyperqube / brew-list.sh
Created May 30, 2020 18:17 — forked from eguven/brew-list.sh
List all packages installed using Homebrew and their sizes
brew list -f1 | xargs -n1 -P8 -I {} \
sh -c "brew info {} | egrep '[0-9]* files, ' | sed 's/^.*[0-9]* files, \(.*\)).*$/{} \1/'" | \
sort -h -r -k2 - | column -t
.line
{
font-family: monospace;
margin: 2px;
}
pre {
background-color: ghostwhite;
border: 1px solid silver;
padding: 10px 20px;
if (!library)
var library = {};
library.json = {
replacer: function(match, pIndent, pKey, pVal, pEnd) {
var key = '<span class=json-key>';
var val = '<span class=json-value>';
var str = '<span class=json-string>';
var r = pIndent || '';
if (pKey)
@hyperqube
hyperqube / ShellCommand.rb
Created November 9, 2012 21:12
Wrapper for open 3
class ShellCommand
include Logging
attr_accessor :command_array ,:out, :err, :stat
def initialize (command_array)
@command_array = command_array
end
def exec
cmd = Escape::shell_command @command_array.flatten
logger.debug "Command: #{cmd}"
logger.debug "Current directory: #{Dir.pwd}"
@hyperqube
hyperqube / Logging.rb
Last active October 12, 2015 14:37
Logging module for Ruby
require 'logger'
module Logging
def logger
@logger ||= Logging.logger_for(self.class.name)
end
# Use a hash class-ivar to cache a unique Logger per class:
@loggers = {}
# Global, memoized, lazy initialized instance of a logger
require 'rake'
files = FileList.new('D:/dev/**')
.exclude(/csv/)
.exclude(/htm/)
p files.gsub(/D:/,'C:')
p files.ext('m4a')
@hyperqube
hyperqube / set_static_ip.sh
Created September 30, 2012 20:54
Set static ip for Solaris 11
sudo svcadm disable svc:/network/physical:nwam
sudo ipadm create-addr -T static -a 10.0.0.7/24 e1000g0/v4static
sudo route -p add default 10.0.0.1
sudo svcadm enable svc:/network/physical:default
sudo svcadm restart svc:/network/physical:default
@hyperqube
hyperqube / rename_computer.bat
Created September 30, 2012 01:36
Rename computer
NETDOM RENAMECOMPUTER %COMPUTERNAME% /NewName:%NEWNAME%