Skip to content

Instantly share code, notes, and snippets.

Working from home

Tomasz Drozdowski marffinn

Working from home
View GitHub Profile
View there You go.js
// this is basically the function i've written not long ago - yours may differ
// from mine but the most important thing is to set the name for the component that is imported/loaded
// Note that instead of name there are values like position, scale material name, color hex code and basically everything
// that the imported objects' array contains
var load_consecutive = function(objectFetch, nameFetch, scaleFetch, positionFetch, materialFetch) {
loader.load(objectFetch, function(object) {
object = new THREE.Mesh(object, materialFetch);
object.material.needsUpdate = true;
View linki.txt
View gist:6aea47070492e7d26422d04d1c263bab
View linki plotter
3D Printer:
marffinn / custom-nav-walker-usage.php
Created Jun 12, 2018 — forked from kosinix/custom-nav-walker-usage.php
WordPress: Using a custom nav walker to create navigation menus in plain <a> tags. That is the <ul> and <li> tags are not present. Very useful if you want to create simple links that can be centered with a simple text-align:center on the containing element.
View custom-nav-walker-usage.php
// In your template files like footer.php
// The items_wrap value ('%3$s') removes the wrapping <ul>, while the custom walker (Nav_Footer_Walker) removes the <li>'s.
wp_nav_menu(array('items_wrap'=> '%3$s', 'walker' => new Nav_Footer_Walker(), 'container'=>false, 'menu_class' => '', 'theme_location'=>'footer', 'fallback_cb'=>false ));
marffinn / JavaScript - [ checks if DOM element on screen ]
Last active Oct 12, 2015
JavaScript function to check if an DOM element is on screen
View JavaScript - [ checks if DOM element on screen ]
$.fn.isOnScreen = function(){
var element = this.get(0);
var bounds = element.getBoundingClientRect();
return < window.innerHeight && bounds.bottom > 0;
You can’t perform that action at this time.