Skip to content

Instantly share code, notes, and snippets.

View Frizi's full-sized avatar

Paweł Grabarz Frizi

  • Poland
View GitHub Profile
@Frizi
Frizi / git-show-staged.sh
Created June 28, 2020 20:00
Git pre-commit hook to prevent checking in "nocheckin" or other specified strings.
#!/bin/sh
exec git show ":$1"
#![allow(dead_code)]
use crate::{components::*, ecs::prelude::*, math::Matrix4};
#[derive(Default)]
pub struct LocalToWorldSystem;
impl LocalToWorldSystem {
pub fn build(&mut self) -> Box<dyn Schedulable> {
SystemBuilder::<()>::new("LocalToWorldUpdateSystem")
// Translation
.with_query(<(Write<LocalToWorld>, Read<Translation>)>::query().filter(
impl<'a, B: Backend, T: ?Sized> Reducer<B, T> for CombineSubpassesReducer {
fn reduce(&mut self, editor: &mut GraphEditor<B, T>, node: NodeIndex) -> Reduction {
let mut candidate_merge = None;
match editor.graph().node_weight(node) {
Some(PlanNodeData::RenderSubpass(_)) => {
let mut read_attachments = walk_attachments(editor.graph().parents(node));
// Do all attachments I read come from the same node? If so, which node?
while let Some((_, access_node)) = read_attachments.walk_next(editor.graph()) {
error: internal compiler error: src\librustc\infer\lexical_region_resolve\mod.rs:767: collect_error_for_expanding_node() could not find error for var '_#161r in universe U133, lower_bounds=[
RegionAndOrigin(RePlaceholder(Placeholder { universe: U132, name: BrNamed(crate0:DefIndex(1423), 'a) }),Subtype(TypeTrace(ObligationCause { span: src\system.rs:456:14: 456:19, body_id: HirId { owner: DefIndex(2975), local_id: 381 }, code: ImplDerivedObligation(DerivedObligationCause { parent_trait_ref: Binder(<[closure@src\system.rs:456:20: 468:14 components:_] as SystemCallable<(), <(Query<Read<Pos>, EntityFilterTuple<ComponentFilter<Pos>, Passthrough, Passthrough>>, Query<Read<Vel>, EntityFilterTuple<ComponentFilter<Vel>, Passthrough, Passthrough>>) as QuerySet<'a>>::PreparedQueries>>), parent_code: MiscObligation }) }))),
RegionAndOrigin(RePlaceholder(Placeholder { universe: U132, name: BrNamed(crate0:DefIndex(1423), 'a) }),Subtype(TypeTrace(ObligationCause { span: src\system.rs:456:14: 456:19, body_id: HirId {
@Frizi
Frizi / rendy scheduled nodes
Created August 6, 2019 17:43
scheduled nodes just before the bug with unimplemented case in scheduler
[TRACE][rendy_graph::graph] Scheduled nodes execution Chains {
schedule: Schedule {
map: {
QueueFamilyId(
0,
): Family {
id: QueueFamilyId(
0,
),
queues: [
@Frizi
Frizi / encoding.rs
Last active January 4, 2019 11:42
StreamEncoder related types prototype
use amethyst::{
core::nalgebra::{Vector2, Vector4},
ecs::{
join::{BitAnd, Join, JoinIter},
world::Index,
Component, ReadStorage,
},
shred::{DynamicSystemData, Resources, SystemData},
};
@Frizi
Frizi / build.sh
Last active November 12, 2018 22:53
gcloud cached docker build setup
#!/usr/bin/env bash
cd `dirname $0`/../..
set -e
IMAGE_NAME=eu.gcr.io/${PROJECT_ID}/${REPO_NAME}/$1
# Use multiple cache sources that make sense in given context.
# This setup is good for pull-request based CI, as most branches
# are based on master branch, each commit has a high chance
# to hit the cache of it's direct parent.
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->