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
use std::marker::PhantomData; | |
pub trait MyTrait<'a> { | |
fn new() -> Self; | |
fn derpity(&'a self); | |
} | |
struct Derp; | |
impl<'a> MyTrait<'a> for Derp { |
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
pub trait MyTrait<'a> { | |
fn foo(n: &'a i32); | |
} | |
struct Derp; | |
impl<'a> MyTrait<'a> for Derp { | |
fn foo(n: &'a i32) { | |
} | |
} |
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 ENCRYPTED FLING CONFIGURATION----- | |
FTTKvMlxv0rs0ACBydlXFHZHYmKQtRUN6PlwI4ZW5gYXV57u/zO90KRD0Nn2 | |
Buj3/CsJGgbWx5fM2X8eGJKRryuZ7eNSm9C0doq2lRikrqV+gsBNqa0e/lkc | |
P4b8q7GfZyralBwvMTBnoOhmUtNPM1orafFIhSYI6wN2ZKpnZgAar9NQRkxZ | |
LJWTvqzlWVdZ6ranCzmRJhAClr7822GylXIIeOycpm8EC8ESRRmiaYMJMPxe | |
3BBlk1KuTTnU4WVDbJVW/9f9+zcZViZDUTyNt5LougR8LLC8FbN1p+UiLSWx | |
CZA940Mo/DVWN29uJL8FitY8mJDZEJ8/OJr/5zptzAFaj0zhs+uLafjvI96D | |
------END ENCRYPTED FLING CONFIGURATION------ |
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
Using /Users/tonyarcieri/.rvm/gems/jruby-1.7.19 | |
$ gem install rails-assets-jruby --source "https://rails-assets.org" | |
ERROR: While executing gem ... (Java::JavaLang::RuntimeException) | |
Could not generate DH keypair |
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
$ gem install irust | |
Successfully installed irust-1.2.0 | |
Parsing documentation for irust-1.2.0 | |
Done installing documentation for irust after 0 seconds | |
1 gem installed | |
$ irust | |
Using rustc 1.0.0-nightly (083b8a404 2015-04-05) (built 2015-04-04) | |
irust> let mut nums = [1,2,3,4,5,6]; | |
() | |
irust> nums |
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
+--------------------------+-----------+ | |
| tach | total | | |
+--------------------------+-----------+ | |
| curb (persistent) | 2.519088 | | |
+--------------------------+-----------+ | |
| em-http-request | 2.731645 | | |
+--------------------------+-----------+ | |
| Typhoeus | 2.851911 | | |
+--------------------------+-----------+ | |
| StreamlyFFI (persistent) | 2.853786 | |
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
def verify_domain_component(san_component, domain_component) | |
parts = san_component.split("*", -1) | |
return false if parts.size > 2 | |
return san_component == domain_component if parts.size == 1 | |
domain_component.start_with?(parts[0]) && domain_component.end_with?(parts[1]) | |
end | |
fail unless verify_domain_component("foo", "foo") | |
fail unless verify_domain_component("f*", "foo") |
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
const THING: [u8; 4] = [0x61, 0x62, 0x63, 0x64]; | |
// replace ^^^ with a bytestring | |
// const THING: [u8; 4] = b"abcd"[..4]; | |
fn main() { | |
// NO COPYING ALLOWED HERE PLZTKS | |
i_need_a_four_byte_array(THING) | |
} |
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
require 'redis' | |
require 'timeout' | |
redis = Redis.new | |
redis.set('chunky', 'bacon') | |
res_a = nil | |
res_b = nil | |
count = 0 | |
outer_count = 0 |
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 | |
mQENBFS2LA0BCACy/N3h9D5bK5Q5Ym4qOLoYc/qD4ttJ/icXtrvy3K5Kp2x8rwTm | |
fum6R4yaia2yeSeMvR0UZAIkOz2Pf5gyBc1x0A1UIyAxnkWTndL7GjxNP/bMoumY | |
otG3wCqf+QQPAqj5/X0k6jhVARRjRJaRaNQrj7mdboD2SJSxrIr0pw1JpBCWaAc+ | |
ySuLwhaV1BjIxnS3sPztaWEgKth0ipjwlcOHskSJ1kAbjrnjicnw/D18EY9JBzJ4 | |
yxj7i0JcTvK4F0we4l3MJ2kFjPLhk6pV4t3oTHZV7yUApTUnugPmDDiLH5YRjlEw | |
nxvHtOzGDM2CODn5PqX2nQ3T10srLMHNM8ErABEBAAG0IFRvbnkgQXJjaWVyaSA8 | |
YmFzY3VsZUBnbWFpbC5jb20+iQE/BBMBAgApBQJUtiwNAhsDBQkSzAMABwsJCAcD |