Skip to content

Instantly share code, notes, and snippets.

pub struct Sess<'s> {
pub session: &'s ssh2::Session,
pub channel: ssh2::Channel<'s>
}
rental! {
pub mod rentals {
use super::*;
#[rental_mut]
pub struct SSHSession {
@cnd
cnd / s.rs
Created March 26, 2019 07:13
pub struct Sess<'s> {
pub session: &'s ssh2::Session,
pub channel: ssh2::Channel<'s>
}
rental! {
pub mod rentals {
use super::*;
#[rental_mut]
pub struct SSHSession {
rror[E0277]: `*mut libssh2_sys::LIBSSH2_CHANNEL` cannot be sent between threads safely
--> src/data/mod.rs:43:1
|
43 | / lazy_static! {
44 | | pub static ref SSHSESSION : Mutex<Option<self::rentals::SSHSession>> = {
45 | | Mutex::new(None)
46 | | };
47 | | }
| |_^ `*mut libssh2_sys::LIBSSH2_CHANNEL` cannot be sent between threads safely
|
@cnd
cnd / 1.rs
Created March 25, 2019 13:56
rental! {
pub mod rentals {
use super::*;
#[rental_mut]
pub struct SSHSession {
session: Box<ssh2::Session>,
channel: &'session ssh2::Channel<'session>,
}
}
}
 * Package: dev-haskell/hscolour-1.24.4
 * Repository: haskell
 * Maintainer: [email protected]
 * USE: abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES: ccache preserve-libs sandbox userpriv usersandbox
>>> Unpacking source...
>>> Unpacking hscolour-1.24.4.tar.gz to /var/tmp/portage/dev-haskell/hscolour-1.24.4/work
>>> Source unpacked in /var/tmp/portage/dev-haskell/hscolour-1.24.4/work
>>> Preparing source in /var/tmp/portage/dev-haskell/hscolour-1.24.4/work/hscolour-1.24.4 ...
>>> Source prepared.
Running haskell-updater-1.3.1 using GHC 8.4.4
* Executable: /usr/bin/ghc
* Library directory: /usr/lib64/ghc-8.4.4
* Package manager (PM): portage
* Mode: OnlyInvalid
Searching for packages installed with a different version of GHC.
Found the following old packages:
* app-portage/hackport:0
[package]
name = "Cloyster"
version = "0.4.1"
authors = [ "***" ]
# NOTE: after hyper 0.9 version they had dropped SSL support
# Do not update hyper library without being sure that SSL support is back
[dependencies]
rust-ini = "*"
argparse = "*"
[[package]]
name = "Cloyster"
version = "0.4.1"
dependencies = [
"argparse 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
"bson 0.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"chrono 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"cookie 0.2.5 (registry+https://github.com/rust-lang/crates.io-index)",
"diesel 1.3.3 (git+https://github.com/diesel-rs/diesel.git)",
diesel/src/expression/ops/numeric.rs:9:38
|
9 | #[derive(Debug, Copy, Clone, QueryId)]
| ^^^^^^^ Could not find `query_builder` in `diesel`
...
61 | numeric_operation!(Add, " + ");
| ------------------------------- in this macro invocation
@cnd
cnd / run.sh
Created September 10, 2018 19:24
echo "Configuring libpci for your system..."
if [ -z "$HOST" ] ; then
sys=`uname -s`
rel=`uname -r`
realsys="$sys"
if [ "$sys" = "AIX" -a -x /usr/bin/oslevel -a -x /usr/sbin/lsattr ]
then
rel=`/usr/bin/oslevel`
proc=`/usr/sbin/lsdev -C -c processor -S available -F name | head -1`
cpu=`/usr/sbin/lsattr -F value -l $proc -a type | sed 's/_.*//'`