Skip to content

Instantly share code, notes, and snippets.

View Hermitter's full-sized avatar
🦀
Coming out of my shell

Carlos Hermitter

🦀
Coming out of my shell
View GitHub Profile
@Hermitter
Hermitter / app.js
Last active June 19, 2018 19:09
MATRIX CORE Wakeword Audio Play Example
// INITIAL VARIABLES \\
var matrix_ip = '127.0.0.1';// Local Device IP
var matrix_wakeword_base_port = 60001; // Wakeword base port
var matrix_io = require('matrix-protos').matrix_io;// MATRIX Protocol Buffers
var zmq = require('zeromq');// Asynchronous Messaging Framework
// ASSETS FOLDER \\
// Pocket Spinx Language Modeling Files (obtained from http://www.speech.cs.cmu.edu/tools/lmtool-new.html)
const LM_PATH = '/home/pi/assets/9854.lm';// CHANGE THIS NAME TO YOUR FILE NAME
const DIC_PATH = '/home/pi/assets/9854.dic';// CHANGE THIS NAME TO YOUR FILE NAME
@Hermitter
Hermitter / zigbee_registration_backup.js
Last active November 5, 2022 19:47
For handling zigbee lights
/////////////////////////////////////////////////////////////////////////////////////////////////////////
// Set Initial Variables \\
var fs = require('fs');// File system library
var zmq = require('zeromq');// Asynchronous Messaging Framework
var matrix_io = require('matrix-protos').matrix_io;// Protocol Buffers for MATRIX function
var matrix_ip = '127.0.0.1';// Local IP
var matrix_zigbee_base_port = 40001;// Port for Zigbee driver
var networkCommands = matrix_io.malos.v1.comm.ZigBeeMsg.NetworkMgmtCmd.NetworkMgmtCmdTypes;// Network Command Types
var networkStatuses = matrix_io.malos.v1.comm.ZigBeeMsg.NetworkMgmtCmd.NetworkStatus// Network Status
var joinTimer = 60// Amount of time for Zigbee devices to join
@Hermitter
Hermitter / nodeNAN_examples.cpp
Created December 19, 2018 17:06
simple code snippets to help me with nan.h in node.js addons.
// grab array
v8::Local<v8::Array> jsArray = v8::Local<v8::Array>::Cast(info[0]);
// array length
int arraySize = jsArray->Length();
// grab first array element & converto to proper type
int indexOne = jsArray->Get(0)->Int32Value();
// return element
info.GetReturnValue().Set(indexOne);
@Hermitter
Hermitter / increase_root_fedora.md
Created September 29, 2020 19:28 — forked from 181192/increase_root_fedora.md
How to increase the root partition size on Fedora

How to increase the root partition size on Fedora

Boot up with an Fedora Live USB stick.

  1. Run vgs to check if there's any space:
$ sudo vgs
  VG     #PV #LV #SN Attr   VSize    VFree
  fedora   1   3   0 wz--n- <237.28g    0 
@Hermitter
Hermitter / firewalld_service_cheatsheet.sh
Last active October 5, 2020 14:51
Creating a Firewalld Service
SERVICE_NAME=minecraft2
ZONE_NAME=FedoraServer
# create service
sudo firewall-cmd --permanent --new-service=$SERVICE_NAME
sudo firewall-cmd --permanent --service=$SERVICE_NAME --add-port=9026/udp
sudo firewall-cmd --permanent --service=$SERVICE_NAME --add-port=9026/tcp
sudo firewall-cmd --reload
# view all existing services