As this started to mature into a real project, I've moved the code to https://github.com/ebroder/rugdby
(There are tests now!)
As this started to mature into a real project, I've moved the code to https://github.com/ebroder/rugdby
(There are tests now!)
I want to write Rust code on my computer (x86_64, Ubuntu 14.04) and produce arm executables. I found hints on the internet, but not a concise set of instructions on what to do. So I wrote them down exactly:
apt-get install g++-arm-linux-gnueabihf
git clone https://github.com/mozilla/rust.git
mkdir rust/build-cross
cd rust/build-cross
../configure --target=arm-unknown-linux-gnueabihf --prefix=$HOME/local/rust-cross
make -j8 && make install
| // "License": Public Domain | |
| // I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. | |
| // In case there are jurisdictions that don't support putting things in the public domain you can also consider it to | |
| // be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it | |
| // an example on how to get the endian conversion functions on different platforms. | |
| #ifndef PORTABLE_ENDIAN_H__ | |
| #define PORTABLE_ENDIAN_H__ | |
| #if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) |
| irb(main):004:0> x = RubyVM::InstructionSequence.new('puts "hello #{foo}"') | |
| => <RubyVM::InstructionSequence:<compiled>@<compiled>> | |
| irb(main):005:0> puts x.disasm | |
| == disasm: <RubyVM::InstructionSequence:<compiled>@<compiled>>========== | |
| 0000 trace 1 ( 1) | |
| 0002 putself | |
| 0003 putobject "hello " | |
| 0005 putself | |
| 0006 opt_send_simple <callinfo!mid:foo, argc:0, FCALL|VCALL|ARGS_SKIP> | |
| 0008 tostring |
This may have seemed like a great idea in 2013, but the repeated "set/clear bits", a.k.a. clamping phases at each level of the hierarchy slowly subtract key strength.
Don't use this as described. Check out Ristretto.
Semi-private keys are an expansion of the traditional idea
| ActiveSupport::XmlMini::FORMATTING.update("yaml" => Proc.new{|yaml| yaml.to_s }) | |
| ActiveSupport::XmlMini::PARSING.update("yaml" => Proc.new{|yaml| yaml.to_s }) |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'rb-fsevent' | |
| require 'optparse' | |
| require 'net/ssh' | |
| require 'net/sftp' | |
| def watch_directory(sftp, watch_dir, target_dir) | |
| fsevent = FSEvent.new |
| require 'pry' | |
| require 'drb' | |
| DRb.start_service | |
| client = DRbObject.new nil, ARGV[0] | |
| # Dummy proxy, DRb won't allow us to pass Readline directly. | |
| Proxy = Object.new |
| function! SelectComment() | |
| let curindent = indent(".") | |
| " bail if not a comment | |
| if getline(".")[curindent] != "#" | |
| return | |
| endif | |
| " find the first commented line | |
| while line(".") - 1 && indent(line(".") - 1) == curindent && getline(line(".") - 1)[curindent] == "#" |
| require 'active_support/concern' | |
| module CachedResource | |
| extend ActiveSupport::Concern | |
| included do | |
| class << self | |
| alias_method_chain :find, :cache | |
| end | |