Skip to content

Instantly share code, notes, and snippets.

Fail Fast, Move On

Lukáš Mešťan arzzen

Fail Fast, Move On
View GitHub Profile
brecert / compact.html
Last active Sep 23, 2021
under 1000 bytes p2p webrtc messaging example (913b)
View compact.html
data:text/html,<body id=B style=display:grid;place-items:center;white-space:pre-line><input id=O type=button value=click_to_start><input id=A placeholder=paste_shared_token><script>D="Description",L="ocal"+D,J=JSON,S=J.stringify,P=J.parse,p=new RTCPeerConnection({iceServers:[{urls:""}]}),C=e=>{W=e=>B.append(e+"\n"),e.onopen=n=>{W`Connected!`,O.value="Send",A.placeholder="Type a message",A.value="",A.oninput=null,R=n=>{v=A.value,W("you:"+v),e.send(v),A.value=""},A.onkeydown=e=>{"Enter"==e.key&&R()},O.onclick=e=>R()},e.onmessage=e=>W("them:"},U=e=>p["create"+e]().then(()=>p["setL"+L]()),U=async e=>p["setL"+L](await p["create"+e]()),O.onclick=e=>{C(p.createDataChannel(L)),U`Offer`},A.oninput=async e=>{p.ondatachannel=e=>C(,v=P(A.value),await p["setRemote"+D](v),"offer"==v.type&&U`Answer`},p.onicecandidate=e=>e.candidate&&p["l"+L]&&(A.value=S(p["l"+L]))</script></body>
geek-at /
Created Aug 13, 2020
The script used to trash a banking phishing site
while :; do
verf=$(cat /dev/urandom | tr -dc '0-9' | fold -w 8 | head -n 1)
pin=$(cat /dev/urandom | tr -dc '0-9' | fold -w 5 | head -n 1)
ip=$(printf "%d.%d.%d.%d\n" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))" "$((RANDOM % 256))")
erikig / common-domain-prefix-suffix-list.tsv
Last active Sep 21, 2021
Top 5000 Most Common Domain Prefix/Suffix List - Courtesy LeanDomainSearch -
View common-domain-prefix-suffix-list.tsv
Rank Type Prefix/Suffix
1. Prefix my+
2. Suffix +online
3. Prefix the+
4. Suffix +web
5. Suffix +media
6. Prefix web+
7. Suffix +world
8. Suffix +net
9. Prefix go+
View User Authentication

User authentication system

Your task is now to create a user authentication system.

This document will guide you through all the features and implication of such system, so that you don't have to search them yourself.

We will focus on web/browser-technologies, however similar concept can be widely applied. This guide, is a work in progress, feel free to comment and provide feedbacks.

Expected Workflows

CGA1123 / initializer.rb
Last active Jan 14, 2020
umbra setup example
View initializer.rb
# config/initializers/umbra.rb
require 'umbra'
Umbra.configure do |config|
config.redis_options = { url: ENV['REDISCLOUD_URL'] } # connect to our redis instance
config.error_handler = proc { |e| Bugsnag.notify(e) } # notify our error tracker
config.request_selector = proc { |env, _resp| env['REQUEST_METHOD'] == 'GET' } # only replicate GET requests
config.logger = Rails.logger
munificent / generate.c
Last active Sep 9, 2021
A random dungeon generator that fits on a business card
View generate.c
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
Buom01 / ic_logo.xml
Last active Dec 23, 2019
TWA splashscreen
View ic_logo.xml
IMPORTANT NOTE: This gist in now useless since splashscreen are now supported:
<!-- import here your svg logo (in drawables)
tkrotoff /
Last active Sep 17, 2021
Front-end frameworks popularity (React, Vue and Angular)

Findings: React is by far the most popular front-end framework/library (and continues to grow faster), except for the GitHub stars. In addition, React is more loved and "wanted" than other front-end frameworks (although it is more used: satisfaction tends to decrease with popularity).

Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.

Stack Overflow trends

View typed_ref_prperties_bench.php
Real-life becnhmarks (master vs patch)
master typed diff
blog 169 168 -0.77%
fw 818 809 -1.10%
qdig 716 716 0.04%
scrum 517 502 -2.84%
ZF1 Hello 2,637 2,605 -1.23%
ZF2 Test 675 667 -1.13%
flipace / gdpr-list.json
Last active Jun 6, 2020
List of URLs where you can request your data according to GDPR/DSGVO laws
View gdpr-list.json
{ "name": "Amazon", "url": "", "note": "Select, in this order: 'Digitale Dienste' -> 'Datenauskunft beantragen' -> 'Datenauskunft für eine spätere Zusendung beantragen' -> 'Daten aus allen Kategorien anfordern' -> Namen eingeben und Nachricht vervollständigen. -- Amazon Support Staff will review your request and send you an email, asking about a postal address. If you don't answer to their mail, your request won't be fulfilled." },
{ "name": "McDonalds", "url": "" },
{ "name": "", "url": "" },
{ "name": "Spotify", "url": "" },
{ "name": "Google", "url": "" },
{ "name": "PlayStation", "email": "" },
{ "name": "Humble Bundle", "email": "" },
{ "name": "REWE Group AT", "email": "" },
{ "name": "BILLA", "url": "https: