Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View marffinn's full-sized avatar
🏠
Working from home

Tomasz Drozdowski marffinn

🏠
Working from home
View GitHub Profile
@marffinn
marffinn / electron-packager-extra-resource.md
Created February 17, 2022 12:04 — forked from fodra/electron-packager-extra-resource.md
Command to add extra resources in your electron app

This is the example usage of electron-packager that I never found online anywhere else.

To add resource.exe and resource2.dll in the resource folder when you create an installer, this is how you do it with the --extra-resource commandline switch.

--extra-resource

electron-packager . --overwrite --asar --extra-resource="resource1.exe" --extra-resource="resource2.dll" --platform=win32 --arch=ia32 --icon=./frontend/dist/assets/icon.ico --prune=true --out=./build --version-string.ProductName='Hot Pan de sal'

within the backend code you can refer to the files as:

https://www.quaddicted.com/files/tools/
@marffinn
marffinn / app.js
Created June 6, 2021 20:54 — forked from dtrenz/app.js
Example node + socket.io chat app using express.
#!/usr/bin/env node
var express = require('express');
var app = express();
var server_port = process.env.PORT || 5000;
var server = require('http').createServer(app);
var io = require('socket.io').listen(server);
var users = {};
server.listen(server_port);
@marffinn
marffinn / there You go.js
Last active June 5, 2019 17:42
Jhonny Freitas
// 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;
https://threejsfundamentals.org/threejs/lessons/threejs-post-processing.html
http://stm32duino.com/viewtopic.php?t=1054
https://www.onetransistor.eu/2017/12/program-stm32-bluepill-hal-eclipse.html
https://www.instructables.com/id/Arduino-Mini-CNC-Plotter-Machine-from-dvd-drives/
https://www.instructables.com/id/How-to-Make-GRBL-CNC-V3-Shield-Based-Mini-CNC-Mach-1/
http://electricdiylab.com/enable-z-axis-servo-functionality-for-grbl-mi-inkscape-extension/
http://www.mediafire.com/file/9x1m60w1x6tdhaw/MI+Inkscape+Extension.zip
https://ncviewer.com/
3D Printer:
http://ramps3dprinter.blogspot.com/2013/08/connections-of-ramps-14.html
https://www.hta3d.com/image/catalog/Impresoras/P3Steel/Esquemas/RAMPS%201.4%20EN-sinsensor-alt.jpg
@marffinn
marffinn / custom-nav-walker-usage.php
Created June 12, 2018 10:40 — 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.
<?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
marffinn / JavaScript - [ checks if DOM element on screen ]
Last active October 12, 2015 12:20
JavaScript function to check if an DOM element is on screen
$.fn.isOnScreen = function(){
var element = this.get(0);
var bounds = element.getBoundingClientRect();
return bounds.top < window.innerHeight && bounds.bottom > 0;
}