Skip to content

Instantly share code, notes, and snippets.

@ChristophCaina
ChristophCaina / s3-box3.yaml
Last active October 12, 2024 20:34
Code for the ESP32-S3-Box3
#------------------------------------------------------------------------------------#
# PIN Schematics #
# #
# GPIO-00 MCU-BOOT #
# GPIO-01 Speaker Mute-Status #
# GPIO-02 I2S MCLK #
# GPIO-03 Touch-Screen TT21100 Interrupt Pin #
# GPIO-04 ILI92xxx Display DC-Pin (SPI: CLK-Pin) #
# GPIO-05 ILI92xxx Display CS-Pin (SPI: MOSI-Pin) #
# GPIO-06 ILI92xxx Display SDA #
substitutions:
name: korvo-1
friendly_name: "Korvo 1"
ip_address: 192.168.1.101
wifi_ssid: iot
power_save: high
esphome:
name: ${name}
platformio_options:
@sajov
sajov / service-proxy.js
Last active January 10, 2020 00:31
Feathers js Service Proxy
const { Client } = require("undici");
const qs = require("qs");
exports.ServiceProxy = class ServiceProxy {
constructor(options) {
if (!options.remote) throw new Error("Options expect `remote`");
try {
this.client = new Client(options.remote, {
connections: options.connections || 100,
@jesugmz
jesugmz / Deploy-Next.js-static-to-GitLab-pages.md
Last active April 9, 2024 14:33
Deploy Next.js static to GitLab pages

Deploy Next.js static to GitLab pages

Create a basic GitLab CI config:

$ cat .gitlab-ci.yml
image: node

before_script:
 - npm install
@jlpdiez
jlpdiez / RaspiSnips.md
Last active January 20, 2025 13:07
Installing Snips with ReSpeaker Mic Array v2.0 / ReSpeaker 2-Mics Pi HAT
@sixertoy
sixertoy / audio-proxy-server.js
Last active October 16, 2023 21:16
Simple Audio Streaming Proxy | NodeJS + Express + MP3
/**
* INSTALL:
* ----
* > yarn add express request
*
* RUN:
* ----
* > node ./audio-proxy-server
*/
const os = require('os');
@Brian-McBride
Brian-McBride / Feathers-ArangoDB-Connector.md
Last active February 15, 2020 18:53
Feathers-ArangoDB

This is a start to get ArangoDB as a connector for FeathersJS

Dependencies

You'll need a few npm packages.

yarn add arangojs
yarn add uuid
yarn add clone-deep
@yohgaki
yohgaki / user_serializer.php
Last active January 30, 2020 20:24
How to implement user defined serializer by PHP 7.1 or less
<?php
// This code is to explain why current API is not good for user defined serializer.
// https://wiki.php.net/rfc/user_defined_session_serializer
ob_start();
ini_set('session.serialize_handler', 'php_serialize');
ini_set('session.save_handler', 'files');
ini_set('session.save_path', '/tmp');
ini_set('session.use_strict_mode', 0);
@mscdex
mscdex / test.js
Last active September 15, 2023 11:55
sharing sessions between node.js and php using redis
var express = require('express'),
app = express(),
cookieParser = require('cookie-parser'),
session = require('express-session'),
RedisStore = require('connect-redis')(session);
app.use(express.static(__dirname + '/public'));
app.use(function(req, res, next) {
if (~req.url.indexOf('favicon'))
return res.send(404);
@pgwillia
pgwillia / LogDIH.js
Last active June 20, 2019 15:09
how to log in Solr DIH ScriptTransformer
function transformer(row){
var log = java.util.logging.Logger.getLogger("transformer");
var LEVEL = java.util.logging.Level.INFO;
log.log(LEVEL, "hello world")
}