Skip to content

Instantly share code, notes, and snippets.

View ravenlp's full-sized avatar

Jorge Condomí ravenlp

View GitHub Profile
@ravenlp
ravenlp / simple_lcd_serial.ino
Created June 17, 2013 05:06
Simple Arduino code used to show data on the lcd shield over a serial connection. Ideal to have the output of a script (Node/Ruby/Pyhon etc) shown on a pretty lcd screen
/*
LiquidCrystal Library - Serial Input
*/
/*
This example code is in the public domain.
http://arduino.cc/en/Tutorial/LiquidCrystalSerial
*/
@ravenlp
ravenlp / parse.js
Created June 20, 2013 05:26
NodeJs script to parse webpages and send data to Arduino via Serial connection
#!/usr/bin/env node
/* Info that is likely to be different for you */
var ARDUINO_PORT = "/dev/tty.usbserial-A1004c6U",
URL = 'http://www.cotizacion-dolar.com.ar/',
FETCH_CICLE = 30 * 60 * 1000;
/* Probably it's not a good idea to modify the following lines */
var jsdom = require("jsdom"),
sp = require("serialport"),
@ravenlp
ravenlp / gist:96a66df5dbc1b96afba7
Last active September 22, 2015 10:04
Angular ng-hide fade in/out animation
.fadable {
transition: 0s linear all;
}
.fadable.ng-hide-remove {
opacity: 0;
display: block !important;
transition: 0.5s linear all;
}
.fadable.ng-hide-remove.ng-hide-remove-active {
opacity: .5;
@ravenlp
ravenlp / .gitconfig
Created July 20, 2015 18:36
Git useful alias
[alias]
graph = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
co = checkout
st = status
@ravenlp
ravenlp / settings.json
Created July 5, 2024 01:42
Visual Studio Code config to show better tab labels on a NextJs 14 project
{
"workbench.editor.customLabels.patterns": {
"**/app/**/[[]*[]]/[[]*[]]/page.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • page",
"**/app/**/[[]*[]]/page.tsx": "${dirname(1)}/${dirname} • page",
"**/app/**/page.tsx": "${dirname} • page",
"**/app/**/[[]*[]]/[[]*[]]/default.tsx": "${dirname(2)}/${dirname(1)}/${dirname} • default",
"**/app/**/[[]*[]]/default.tsx": "${dirname(1)}/${dirname} • default",
"**/app/**/default.tsx": "${dirname} • default",
@ravenlp
ravenlp / sonyIRTrigger.ino
Created June 18, 2025 18:36
Simple Arduino IR trigger for cameras Sony a6300 a6200 etc
#include <IRremote.hpp>
#define IR_LED_PIN 9
#define BUTTON_PIN 2
const unsigned long SONY_SHUTTER_CODE = 0xB4B8F;
const int BITS = 20;
unsigned long lastButtonPress = 0;
const unsigned long debounceDelay = 50; // 50 ms debounce
@ravenlp
ravenlp / Prusa Core one after layer change script
Created June 18, 2025 18:41
Custom G-CODE to hit a switch on top of the back-left stepper motor on a Prusa Core One. Parts of the code has been taken from bambooStudio that let the user enable this feature from the UI
;AFTER_LAYER_CHANGE
;[layer_z]
G92 E0 ;Stop extrusion
G1 E-0.7 F1800 ;Retraction
G17
G2 Z{layer_z + 0.4} I0.86 J0.86 P1 F20000 ;Spiral lift a little
G1 X110 Y220 F20000 ;Move to safe pos
G17
G2 Z{layer_z} I0.86 J0.86 P1 F20000
G1 X0 F15000