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
# Set a git proxy for the SSH a git protocols in the current shell. | |
# | |
# Note that for SSH you can also set the Proxycommand in the ~/.config/ssh | |
# file, which might be more convenient than setting that in each shell | |
# | |
# Host gh | |
# User git | |
# Hostname github.com | |
# Port 22 | |
# IdentityFile ~/.ssh/my_key |
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::fmt; | |
use std::error::Error; | |
use std::str::FromStr; | |
pub struct Ipv4Network(u32, u32); | |
pub struct Ipv6Network(u128, u128); | |
#[derive(Debug)] | |
pub struct MalformedAddress(String); |
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
class ResponseError { | |
constructor(response) { | |
this.response = response; | |
} | |
async read() => { | |
return this.response | |
.text() | |
.then(body => { | |
return { |
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
yarn run v1.16.0 | |
$ /home/corentin/code/clojure/learn-reagent-course-files/giggin/node_modules/.bin/shadow-cljs -d nrepl:0.6.0 -d cider/piggieback:0.4.1 -d cider/cider-nrepl:0.22.0-beta4 server | |
shadow-cljs - config: /home/corentin/code/clojure/learn-reagent-course-files/giggin/shadow-cljs.edn cli version: 2.3.30 node: v11.15.0 | |
shadow-cljs - starting ... | |
shadow-cljs - Using IP "192.168.43.195" from Interface "wlp58s0" | |
WARNING: An illegal reflective access operation has occurred | |
WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/home/corentin/.m2/repository/org/jboss/xnio/xnio-nio/3.3.8.Final/xnio-nio-3.3.8.Final.jar) to constructor sun.nio.ch.EPollSelectorProvider() | |
WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2 |
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 futures::{ | |
stream::Stream, | |
task::{Context, Poll}, | |
Future, | |
}; | |
use std::pin::Pin; | |
use tokio::sync::mpsc::{Receiver, Sender}; | |
/// Dummy structure that represent some state we update when we | |
/// receive data or events. |
Here are my working notes on getting a system up and running.
WARNING: You can run into a hidden problem that will prevent a correct partition setup and /etc/nixos/configuration.nix
from working: if you are setting up a UEFI system, then you need to make sure you boot into the NixOS installation from the UEFI partition of the bootable media. You may have to enter your BIOS boot selection menu to verify this. For example, if you setup a NixOS installer image on a flash drive, your BIOS menu may display several boot options from that flash drive: choose the one explicitly labeled with “UEFI”.
I used these resources:
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 fn parse_ip(payload: &[u8]) -> Result<IpAddr, DecodeError> { | |
match payload.len() { | |
4 => Ok(Ipv4Addr::new(payload[0], payload[1], payload[2], payload[3]).into()), | |
16 => Ok(Ipv6Addr::from([ | |
payload[0], | |
payload[1], | |
payload[2], | |
payload[3], | |
payload[4], |
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
// This runs into https://github.com/rust-lang/rust/issues/56105 | |
pub trait MyTrait<T> { | |
fn method(&self, _:T); | |
} | |
impl<T> MyTrait<T> for Box<dyn MyTrait<T>> { | |
fn method(&self, t: T) { | |
(**self).method(t) | |
} |
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::fmt::Debug; | |
trait MyTrait: Debug { | |
fn m(&self); | |
} | |
#[derive(Debug)] | |
struct Foo; | |
impl MyTrait for Foo { |
OlderNewer