Skip to content

Instantly share code, notes, and snippets.

pub trait FilterWith: AsQuery + Sized {
fn filter_with(self, filters: FilterOpts) -> FilteredQuery<Self::Query> {
FilteredQuery {
query: self.as_query(),
filters,
}
}
}
#[derive(QueryId)]
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6132335b3..2445578b1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -367,10 +367,11 @@ else()
#PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT development
#PRIVATE_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} COMPONENT development
RESOURCE DESTINATION ${CMAKE_INSTALL_DATADIR} COMPONENT development
+
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT development
[2020-06-08 05:43:58.680537] I [MSGID: 100030] [glusterfsd.c:2867:main] 0-/usr/sbin/glusterfsd: Started running /usr/sbin/glusterfsd version 7.5 (args: /usr/sbin/glusterfsd -s redrock --volfile-id data0.redrock.bricks-bricksredrock -p /var/run/gluster/vols/data0/redrock-bricks-bricksredrock.pid -S /var/run/gluster/ed66b80c50cd37cd.socket --brick-name /bricks/bricksredrock -l /var/log/glusterfs/bricks/bricks-bricksredrock.log --xlator-option *-posix.glusterd-uuid=5b64dea3-d862-4599-a1ad-e57a3a0d3144 --process-name brick --brick-port 49152 --xlator-option data0-server.listen-port=49152 --xlator-option transport.address-family=inet6)
[2020-06-08 05:43:58.681028] I [glusterfsd.c:2594:daemonize] 0-glusterfs: Pid of current running process is 16008
[2020-06-08 05:43:58.684123] I [socket.c:958:__socket_server_bind] 0-socket.glusterfsd: closing (AF_UNIX) reuse check socket 9
[2020-06-08 05:43:58.689603] I [MSGID: 101190] [event-epoll.c:682:event_dispatch_epoll_worker] 0-epoll: Started thread with index 0
[2020-06-08
May 14 19:32:37 redrock calico-felix[4910]: 2020-05-14 19:32:37.308 [INFO][4910] felix/env_var_loader.go 40: Found felix environment variable: "datastoretype"="kubernetes"
May 14 19:32:37 redrock calico-felix[4910]: 2020-05-14 19:32:37.308 [INFO][4910] felix/env_var_loader.go 40: Found felix environment variable: "logseverityscreen"="debug"
May 14 19:32:37 redrock calico-felix[4910]: 2020-05-14 19:32:37.308 [INFO][4910] felix/daemon.go 188: Loading config file: /etc/calico/felix.cfg
May 14 19:32:37 redrock calico-felix[4910]: 2020-05-14 19:32:37.308 [INFO][4910] felix/file_loader.go 27: Ignoring absent config file: /etc/calico/felix.cfg
May 14 19:32:37 redrock calico-felix[4910]: 2020-05-14 19:32:37.308 [INFO][4910] felix/config_params.go 293: Merging in config from environment variable: map[datastoretype:kubernetes logseverityscreen:debug]
May 14 19:32:37 redrock calico-felix[4910]: 2020-05-14 19:32:37.308 [INFO][4910] felix/config_params.go 374: Parsing value for DatastoreType: kubernetes (from environment

Keybase proof

I hereby claim:

  • I am fourbytes on github.
  • I am fourbytes (https://keybase.io/fourbytes) on keybase.
  • I have a public key whose fingerprint is EA9A 432A 304E 92D2 9A62 95F5 BAC0 E050 836D 5895

To claim this, I am signing this object:

fn parse_otp(otp: String) -> ([u8; 6], [u8; 32]) {
let otp_raw = otp.as_bytes();
return (otp_raw[0..5], otp_raw[6..37])
}
// this doesn't work
target.draw(&tile_vertex_buffer, &index_buffer, &program, &uniform! {
tex: glium::uniforms::Sampler::new(texture)
.magnify_filter(glium::uniforms::MagnifySamplerFilter::Nearest)
.minify_filter(glium::uniforms::MinifySamplerFilter::Nearest)
}, &Default::default()).unwrap();
// this works
target.draw(&tile_vertex_buffer, &index_buffer, &program, &uniform! {
tex: texture
struct App { }
impl App {
pub fn render(&mut self, args: &RenderArgs, g2d: &mut Glium2d, window: &mut GliumWindow) {
let mut target = window.draw();
target.clear_color(0.53, 0.81, 0.98, 1.0);
target.finish().unwrap();
}
}
// http://recordit.co/LKXWw6hvLK
// player *snaps* to top y of bottom right block when jumping on right wall (and same for left wall, snaps to bottom left top y).
// when player hits top or bottom half of block from the side, it snaps to the the top or bottom of the block relatively.
pub fn collides<F: Point>(a: &AABB<F>, b: &AABB<F>) -> bool {
return na::partial_lt(a.mins(), b.maxs()) &&
na::partial_gt(a.maxs(), b.mins());
}
let mut y_diff = player.velocity.y * args.dt;
#!/usr/bin/env python
import os, time, subprocess, sys
#import libvirt
BACKUP_DIR = "/mnt/backups/vms/DAILY/"
MO_BACKUP_DIR = "/mnt/backups/vms/MONTHLY/"
TODAY = time.strftime('%Y%m%d')
print('Backup procedure started...')