Skip to content

Instantly share code, notes, and snippets.

dfbq91 / LambdaNodeCrud.js
Created October 2, 2020 16:06
Lambda Functions with Nodejs CRUD with DynamoDB
/* Here, there are GET, POST, PUT and DELETE implementations for Lambda functions with Nodejs CRUD using Dynamo DB.
Before the implementation using API Gateway, I used a passed parameter. This implementations are commented */
// GET doesn't change if we are using API Gateway
'use strict';
const AWS = require('aws-sdk'); // Load the AWS SDK for Node.js
Bottelet / timeline.vue
Created June 23, 2020 09:04
Horizontal Calendar with VueJS and Vis.js
<div class="wrapper">
Timeline test 2
<div id="visualization"></div>
sumitpore / chrome-local-storage-api.js
Last active February 9, 2024 05:19
Chrome's Local StorageArea API in Synchronous way for use in Chrome extensions. Replace '' by '' if you want to use Sync StorageArea
* Retrieve object from Chrome's Local StorageArea
* @param {string} key
const getObjectFromLocalStorage = async function(key) {
return new Promise((resolve, reject) => {
try {, function(value) {
public class RTConnection {
private static Context context;
private PeerConnectionFactory peerConnectionFactory;
private PeerConnection peerConnection;
private DataChannel dataChannel;
private RTConnection(Context c) {
context = c;
manuelbl /
Created August 3, 2019 09:12
ESP32 as Bluetooth Keyboard

ESP32 as Bluetooth Keyboard

With its built-in Bluetooth capabilities, the ESP32 can act as a Bluetooth keyboard. The below code is a minimal example of how to achieve it. It will generate the key strokes for a message whenever a button attached to the ESP32 is pressed.

For the example setup, a momentary button should be connected to pin 2 and to ground. Pin 2 will be configured as an input with pull-up.

In order to receive the message, add the ESP32 as a Bluetooth keyboard of your computer or mobile phone:

  1. Go to your computers/phones settings
  2. Ensure Bluetooth is turned on
miguelmota / example.proto
Last active September 20, 2023 02:07
Golang protobuf marshal and unmarshal example
syntax = "proto3";
message Message {
bytes text = 1;
fanvyr /
Last active April 4, 2019 17:35
A smooth registration form

Registration Form

Demo registration-demo


API check
The snippet tries to verify if the mail is okay or bad in general by reaching out to my/a backend.
Therefor the statuscode is important: return a 2xx for okay, and a 4xx with a message for not okay.

setTimeout(function() {
function getAllModules() {
return new Promise((resolve) => {
const id = _.uniqueId("fakeModule_");
[id]: function(module, exports, __webpack_require__) {
Ynn / main.cpp
Created February 14, 2018 15:56
esp8266 : sniff, send in udp, then sniff another channel
#include <Arduino.h>
#ifdef ESP8266
extern "C" {
#include "user_interface.h" //to gain access to promiscuous mode
#include <ESP8266WiFi.h>
#include <WiFiClient.h>
ksmithut / .dockerignore
Last active June 2, 2024 21:43
Node Docker Compose nodemon