Skip to content

Instantly share code, notes, and snippets.

View ricardojlrufino's full-sized avatar

Ricardo JL Rufino ricardojlrufino

View GitHub Profile
#!/bin/bash
# dynamic message of the day
# Robert Tulke, rt@debian.sh
## version
VERSION="dynmotd v1.6"
@ricardojlrufino
ricardojlrufino / A_JQ_FILTER_JSON.js
Last active October 22, 2022 15:05
JQ - Filter big JSON tree - removing attributeS
.document
| walk( if type == "object" and has("type")
then {name, "type"} + (if .characters then { characters } else null end ) + (if .children then { children } else null end )
else .
end )
@ricardojlrufino
ricardojlrufino / 1. Info
Last active May 6, 2022 04:04
YA Home - GPIO stuff
# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
@ricardojlrufino
ricardojlrufino / Makefile
Created April 15, 2022 19:05
Blink Assembly AVR ATMega328p
# --
# Copyright (c) 2021, Ricardo JL Rufino
# Install: apt-get install avr-binutils avr-gcc avr-libc avrdude
# --
MCU=atmega328p
#FUSE_L=0x6A
#FUSE_H=0xFF
#F_CPU=1600000
@ricardojlrufino
ricardojlrufino / Address.java
Last active June 5, 2020 18:40
JAXB - Serialize Map<String, Object> (problem)
package com.ricardojlrufino.rhmitool.controller.configuration.example;
public class Address {
private String street;
private String city;
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
package layout.tabs;
import java.awt.Color;
import java.awt.Component;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Rectangle;
import com.jidesoft.plaf.vsnet.VsnetJideTabbedPaneUI;
@ricardojlrufino
ricardojlrufino / arduino-snippet-serial-read1
Created May 11, 2020 05:31
arduino-snippet-serial-read1
char value = Seria.read();
@ricardojlrufino
ricardojlrufino / psrecord-plotutil.py
Created May 9, 2020 15:35
psrecord plot from txt file
# Copyright (c) 2014, Simon Conseil
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice,
@ricardojlrufino
ricardojlrufino / WhatsappBackupCleanup.sh
Created March 31, 2019 12:13
Whatsapp Backup Cleanup
#!/bin/sh
##
## @author Ricardo JL Rufino
##
echo "Whatsapp Backup Cleanup"
echo "======================================"
@ricardojlrufino
ricardojlrufino / sso.php
Created September 1, 2017 04:48
phpMyAdmin SSO Login Example
<?php
$sso_server = "http://chat.local:8080/api/clients/validateDb";
/* Need to have cookie visible from parent directory */
session_set_cookie_params(0, '/', '', true, true);
/* Create signon session */
$session_name = 'SignonSession';
session_name($session_name);