Edit: This list is now maintained in the rust-anthology repo.
namespace Helios.Samples.LossClient | |
{ | |
using System; | |
using System.Diagnostics; | |
using System.Net; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using Helios.Net.Bootstrap; | |
using Helios.Topology; |
[Serializable] | |
[DebuggerDisplay("Count = {Count}")] | |
public struct ReadOnlyListView<T> : IReadOnlyList<T> | |
{ | |
static readonly List<T> EmptyList = new List<T>(); | |
public static ReadOnlyListView<T> Empty => new ReadOnlyListView<T>(EmptyList); | |
readonly List<T> list; |
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
var s = new Mock<Stream>(); | |
s.SetupGet(x => x.CanWrite).Returns(true); | |
s.Setup(x => x.Write(It.IsAny<byte[]>(), It.IsAny<int>(), It.IsAny<int>())) | |
.Callback((byte[] buf, int ofs, int cnt) => Console.WriteLine( | |
$"under : len: {cnt} content:" + Environment.NewLine + ByteBufferUtil.PrettyHexDump(Unpooled | |
.WrappedBuffer(buf, ofs, cnt).Slice(0, Math.Min(cnt, 10))))); |
under : len: 10 content: | |
+-------------------------------------------------+ | |
| 0 1 2 3 4 5 6 7 8 9 a b c d e f | | |
+--------+-------------------------------------------------+----------------+ | |
|100000000| 1F 8B 08 00 00 00 00 00 04 00 |.......... | | |
+--------+-------------------------------------------------+----------------+ | |
under : len: 8192 content: | |
+-------------------------------------------------+ | |
| 0 1 2 3 4 5 6 7 8 9 a b c d e f | | |
+--------+-------------------------------------------------+----------------+ |
source: http://www.markbrilman.nl/2011/08/howto-convert-a-pfx-to-a-seperate-key-crt-file/ | |
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]` | |
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file. | |
Now let’s extract the certificate: | |
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]` |
Availability and quality of developer tools are an important factor in the success of a programming language. C/C++ has remained dominant in the systems space in part because of the huge number of tools tailored to these lanaguages. Succesful modern languages have had excellent tool support (Java in particular, Scala, Javascript, etc.). Finally, LLVM has been successful in part because it is much easier to extend than GCC. So far, Rust has done pretty well with developer tools, we have a compiler which produces good quality code in reasonable time, good support for debug symbols which lets us leverage C++/lanaguge agnostic tools such as debuggers, profilers, etc., there are also syntax highlighting, cross-reference, code completion, and documentation tools.
In this document I want to layout what Rust tools exist and where to find them, highlight opportunities for tool developement in the short and long term, and start a discussion about where to focus our time an
#![feature(prelude_import)] | |
#![no_std] | |
#![feature(proc_macro, conservative_impl_trait, generators)] | |
#[prelude_import] | |
use std::prelude::v1::*; | |
#[macro_use] | |
extern crate std as std; | |
extern crate amqp1 as amqp; | |
extern crate futures_await as futures; | |
extern crate tokio_io; |
fn main() { | |
let a = Test(None); | |
a.print(); | |
let b = Test(Some(23));//Box::new(Test(Some(23))); | |
b.print(); | |
print_it(&b); | |
} | |
struct Test (Option<i32>); |
-
Check if Ubuntu Linux Kernel version is 4.9
$ uname -r
-
If not, follow the link http://www.yourownlinux.com/2016/12/how-to-install-linux-kernel-4-9-0-in-linux.html instructions to update your Ubuntu Linux Kernel to 4.9