Skip to content

Instantly share code, notes, and snippets.

View vladbat00's full-sized avatar
🦀
Rusting

Vladyslav Batyrenko vladbat00

🦀
Rusting
View GitHub Profile
@vladbat00
vladbat00 / xorg.conf
Created May 3, 2017 19:41
xorg nvidia
Section "ServerLayout"
Identifier "layout"
Screen 0 "nvidia"
Inactive "intel"
EndSection
Section "Device"
Identifier "nvidia"
Driver "nvidia"
BusID "PCI:7:0:0"
@vladbat00
vladbat00 / files
Created June 23, 2017 08:41
UE4 working with files
// accepts relative path to running binary (UE4Editor) or absolute path
FPaths::FileExists
@vladbat00
vladbat00 / parcel-node-target-hotreload.js
Created May 9, 2018 13:36
Parcel bundler for hotreloading node.js target. Start with `run` argument in order get your index.js running after each rebuild
const Bundler = require('parcel-bundler');
const childProcess = require('child_process');
const file = 'index.js';
const options = {};
const bundler = new Bundler(file, options);
const runBundle = process.argv.includes('run');
let bundle = null;
const PLAYER_SPEED: f64 = 50.0;
const TOI_DISTANCE_THRESHOLD: f64 = 0.001;
#[wasm_bindgen(js_name = processPlayersMovement)]
pub fn process_players_movement(time_delta: f64, players: &js_sys::Iterator, objects: &js_sys::Iterator) {
for player_object in players {
let player_object = player_object.unwrap();
let player = player_object.dyn_ref::<muddle_types::Player>();
if player.is_none() {
continue;