Skip to content

Instantly share code, notes, and snippets.

View robertrypula's full-sized avatar

Robert Rypuła robertrypula

View GitHub Profile
@robertrypula
robertrypula / kurwa.js
Last active October 23, 2024 20:32
Adds 'kurwa' to any website that you want. Simply execute the script in the Console tab in DevTools (F12)
document.querySelectorAll('*').forEach(function(element) {
var content = element.innerHTML.trim().replace(/ +(?= )/g, '');
var wordList = content.split(' ');
var numberOfKurwa = Math.max(1, Math.round(wordList.length * 0.2));
var randomPosition;
var i;
if (content.indexOf('<') === -1 && wordList.length > 1) {
while (numberOfKurwa--) {
randomPosition = Math.max(
@robertrypula
robertrypula / post.md
Created July 11, 2019 14:58 — forked from chrisguttandin/post.md
What else can we do with the Web Audio API?

What else can we do with the Web Audio API?

Of course the Web Audio API is meant for synthesizing and processing audio data. It is tailored for that use case. But at least in our digital world audio data is just a series of numbers, which are typically somewhere between +1 and -1. So why can't we use the Web Audio API for general computations?

Almost a year ago I had the pleasure to give a talk at the Web Audio Conference in Atlanta. The conference featured a lot of great talks, which I really appreciated as an attendee. However, as a speaker it was tough to reduce my own talk until it was short enough to fit into the schedule. I had the feeling that I had to rush through my slides. Since then I planned to write down my findings in a more detailed way, but I never got around to it. Luckily I was asked to repeat my talk at our local Web Audio Meetup here in

@robertrypula
robertrypula / web-socket-client.html
Created February 11, 2021 20:48
WebSocket - binary broadcast example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>WebSocket client</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script>
let webSocket;
@robertrypula
robertrypula / web-socket-server.js
Created February 11, 2021 20:50
WebSocket - binary broadcast example (pure NodeJs implementation without any dependency)
// Copyright (c) 2019-2021 Robert Rypuła - https://github.com/robertrypula
/*
+--------------------------------------------------+
| Binary broadcast WebSocket server in pure NodeJs |
+--------------------------------------------------+
Based on great article created by Srushtika Neelakantam:
https://medium.com/hackernoon/implementing-a-websocket-server-with-node-js-d9b78ec5ffa8