It can be challenging to use Ruby for handling raw binary data, involving a lot of Array#pack
and String#unpack
with the possibility of String#ord
and Numeric#chr
for good measure. Some of these tools might make the job a bit easier, allowing your to define schemas of the binary data and how to parse it, or even just allowing your to specify the format in a more verbose way.
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
echo -e "\n$(curl -L https://gist.github.com/jhass/66f02fe5044fa720c623/raw/cert-authority.pub)\n" >> ~/.ssh/authorized_keys |
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 | |
require 'foreman/cli' | |
require File.expand_path(File.dirname(__FILE__)) + '/foreman_export_systemd.rb' | |
Foreman::CLI.start |
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
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v2.0.22 (GNU/Linux) | |
mQENBE7I+ZUBCAC1zez5X2Y4zFbslYAobm4VX3jxV9gfAmN8rF6CM4cvGzcuy4+a | |
woRDXXu016QH3v/pnSSn9neWGNm4HULNiAl3gxIjhBvZcyiVV5eiDQaxLENZrjYb | |
BW0YtseVwWBmwD3mEyA7eRz81rzgldvUbQmh9DEEl0ZJf8tsQWGrQQB7g10bdRVp | |
X2P/KSYsoodDEiF+XDfSPKrzAZoqxa/mSZFCQeyThsvSyTa8baSvDA5iHm/p4MPn | |
Pa0Aki6QYLgYkGo5wFbrPENV7wToMiNOzg21mYdKouaijAC592CqWi1XSQE8nIEq | |
NppX+uI2jazH3EqFNviuyFKyw9fGYInHYHWrABEBAAG0GEpvbm5lIEhhw58gPG1l | |
QG1yenl4LmRlPohGBBARAgAGBQJQ42hSAAoJEOpqsNjng4LhbX8An1qLlq1b/5uA |
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 sh | |
# this script installs rvm with the most recent stable version of ruby | |
# and makes sure it is not run as root, | |
# based on my earlier attempt for a general purpose root avoidance | |
# https://gist.github.com/3930399 | |
# the command we'll be running | |
export RVM_CMD="curl -L https://get.rvm.io | bash -s stable" |
##git mergetool
In the middle file (future merged file), you can navigate between conflicts with ]c
and [c
.
Choose which version you want to keep with :diffget //2
or :diffget //3
(the //2
and //3
are unique identifiers for the target/master copy and the merge/branch copy file names).
:diffupdate (to remove leftover spacing issues)
:only (once you’re done reviewing all conflicts, this shows only the middle/merged file)
This installs a patched ruby 1.9.3-p327 with various performance improvements and a backported COW-friendly GC, all courtesy of funny-falcon.
You will also need a C Compiler. If you're on Linux, you probably already have one or know how to install one. On OS X, you should install XCode, and brew install autoconf
using homebrew.
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 bash | |
# memusg -- Measure memory usage of processes | |
# Usage: memusg COMMAND [ARGS]... | |
# | |
# Author: Jaeho Shin <netj@sparcs.org> | |
# Created: 2010-08-16 | |
############################################################################ | |
# Copyright 2010 Jaeho Shin. # | |
# # | |
# Licensed under the Apache License, Version 2.0 (the "License"); # |
NewerOlder