Skip to content

Instantly share code, notes, and snippets.

View matiaslopezd's full-sized avatar
🛰️
matiaslopezd[at]404.city

Matías López matiaslopezd

🛰️
matiaslopezd[at]404.city
View GitHub Profile
@matiaslopezd
matiaslopezd / webrtc_quic.js
Created September 17, 2022 22:46 — forked from voluntas/webrtc_quic.js
RTCQuicTransport の動作サンプル
// Chrome Canary M74
// chrome://flags で Experimental Web Platform features を有効にすれば使えるようになる
// mDNS を有効にしていると上手く動かないかもしれないので要注意
// https://developers.google.com/web/updates/2019/01/rtcquictransport-api
// https://github.com/shampson/RTCQuicTransport-Origin-Trial-Documentation
const iceTransport1 = new RTCIceTransport;
const iceTransport2 = new RTCIceTransport;
upstream app_server {
ip_hash;
server app_react:3000 max_fails=3 fail_timeout=30s;
}
upstream api_server {
ip_hash;
server api_feathers:3040 max_fails=3 fail_timeout=30s;
}
@matiaslopezd
matiaslopezd / NoVNC_Paste.js
Created February 3, 2020 15:22 — forked from byjg/NoVNC_Paste.js
How to Paste code to NoVNC.
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
window.sendString = function (str) {
f(str.split(""));
function f(t) {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/);
@matiaslopezd
matiaslopezd / app.js
Created February 26, 2019 00:26 — forked from kkkrist/app.js
Rate limiting for FeathersJS HTTP (REST API) and Web Sockets connections (Express, Node.js)
'use strict'
const bodyParser = require('body-parser')
const compress = require('compression')
const configuration = require('feathers-configuration')
const cors = require('cors')
const favicon = require('serve-favicon')
const feathers = require('feathers')
const hooks = require('feathers-hooks')
const limiter = require('limiter').RateLimiter // Generic limiter used for authentication attempts inside web socket connection
@matiaslopezd
matiaslopezd / gist:ad3adc90fd777521b3264feab666d3c6
Created February 22, 2019 03:09 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue: