Skip to content

Instantly share code, notes, and snippets.

View kkkrist's full-sized avatar

Christian Mund kkkrist

View GitHub Profile
{
"mac": [
{
"build": "681094",
"date": 1568757600000,
"link": "https://netix.dl.sourceforge.net/project/osxportableapps/Chromium/Chromium_OSX_77.0.3865.90.dmg",
"tag": "stable-freesmug",
"version": "77.0.3865.90"
},
{
@kkkrist
kkkrist / audio-recorder.jsx
Created August 23, 2018 08:55
Alternate UI for react-mic
import PropTypes from 'prop-types'
import React from 'react'
import { MicrophoneRecorder } from 'react-mic/lib/libs/MicrophoneRecorder'
import app from '../app'
import translate from '../../modules/translate'
import uploadAttachment from '../../modules/upload-attachment'
import Icon from './icon'
const uploadsService = app.service('uploads/:filename')
@kkkrist
kkkrist / app.js
Last active February 26, 2019 00:26
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