Skip to content

Instantly share code, notes, and snippets.

@urish
urish / wokwi-custom-chips-c-api.md
Last active January 30, 2023 05:47
Wokwi Custom Chips C API
@Mlocik97
Mlocik97 / hooks.js
Last active March 2, 2024 18:03
example (writen by hand, not tested) of auth in SvelteKit. (deprecated)
export async function handle({ event, resolve }) {
const cookies = await cookie.parse(event.request.headers.get('cookie') || '');
if (event.url.pathname == '/login') {
// skip verifying user, and allow to load website
const response = await resolve(event);
return response;
}
const user = DB.User.findOne({session: cookies.token});
@fabianoriccardi
fabianoriccardi / Comparison Espressif ESP MCUs.md
Last active May 1, 2024 04:18
Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

Comparison table for ESP8266/ESP32/ESP32-S2/ESP32-S3/ESP32-C3/ESP32-C6

A minimal table to compare the Espressif's MCU families.

ESP8266 ESP32 ESP32-S2 ESP32-S3 ESP32-C3 ESP32-C6
Announcement Date 2014, August 2016, September 2019, September 2020, December
@mrbar42
mrbar42 / README.md
Last active March 28, 2024 18:06
Secured HLS setup with Nginx as media server

Secured HLS setup with Nginx as media server

This example is part of this article.

This is an example for an HLS delivery with basic security. Nginx compiled with nginx-rtmp-module & secure-link is used as media server. Features:

  • Domain filtering
  • Referrer filtering
  • Embed buster
@coccoinomane
coccoinomane / Excel Password Generator.md
Last active May 1, 2024 00:47
Copy this formula into an Excel cell to generate a random 9-character password

Copy this formula into an Excel cell to generate a random 9-character password. Then Copy & Paste Special (as value) in place in order to avoid the cell being continuosly re-evaluated. Formula taken from: http://ficility.net/2013/04/26/easy-excel-based-password-generator/.

English version

=CHAR(RANDBETWEEN(65;90))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(97;122))&CHAR(RANDBETWEEN(65;90))&RANDBETWEEN(1000;9999)&CHAR(RANDBETWEEN(42;43))

English version (with commas)

@danbev
danbev / gist:9887071
Created March 31, 2014 07:30
SockJS curl commands

Open or poll a xhr polling session:

curl -v http://localhost:8081/echo/123/123/xhr

Send to a xhr polling session:

curl -i --header "Content-Type: application/javascript" -X POST -d '["data"]' http://localhost:8081/echo/123/123/xhr_send
@danbev
danbev / gist:9800590
Last active April 30, 2017 13:39
Netty SockJS Refactoring

Netty SockJS Refactoring

Pull request #1615 is intended to add SockJS support to Netty. It does so by adding an API on top of Netty that end users have to implement. The interface that users had to implement looks like this:

/**
 * Represents the server side business application server in SockJS.
 */
public interface SockJsService {

    /**
     * The {@link SockJsConfig} for this service
@birkir
birkir / Bootstrap.php
Last active September 30, 2022 11:51
Twitter Bootstrap helper module for Kohana 3.3 (DRAFT)
<?php
/**
* Twitter Bootstrap Kohana helper
*
* example of use:
* <?=Bootstrap::grid($grid, Bootstrap::FLUID);?>
* <?=$grid->span($view, 4);?>
* <?=Bootstrap::icon('download', TRUE);?>
* <?=Bootstrap::button('Button'); ?>