Skip to content

Instantly share code, notes, and snippets.

View arzzen's full-sized avatar
🤖
I'm borg...

arzzen

🤖
I'm borg...
  • ::1
  • 02:21 (UTC)
View GitHub Profile

git .mailmap file

Steps

  1. Use this good git alias
git config --global alias.summary '! git shortlog --summary --numbered --email --all --no-merges'
@rscs
rscs / FlipperZero-RFID-blanks.md
Last active April 16, 2024 05:37
Rewritable RFID blanks for Flipper Zero

A list of rewritable RFID blanks that are compatible with Flipper Zero.

X indicates a particular protocol is writable.

? indicates it is unknown if a particular protocol is writable.

Brand Type Chip EM4100 H10301 Indala26 IoProxXSF AWID FDX-A FDX-B HIDProx HIDExt Pyramid Viking Jablotron Paradox PAC/Stanley Keri Gallagher
ETEKJOY Fob EM4305 X X X X X X
@vic-cieslak
vic-cieslak / calc mine.py
Created December 4, 2021 14:28
lotus mining calculator
#!/usr/bin/python
import requests
import math
import json
system_cost_usd = 4000 # usd
power_consumption_watt = 700 #
electricity_cost_kwh_usd = 0.1 # usd
def calc_derivative(principal, apr, gas, t=days_between_compounds):
return (principal*((-gas/principal) + ((apr/100)/365) * t + 1)(365/t)) * ( ((apr/100)/( t( (-gas/principal) + t(apr/100)/365 + 1) )) - (365np.log( (-gas/principal) + t(apr/100)/365 + 1))/t2 )
def calc_final_value(principal, apr, gas, num_days):
return principal(1+(num_days(apr/100)/365 - gas/principal))**(365/num_days)
def find_ideal_compound_rate(principal, apr, gas):
der = 99999999999999999
@brecert
brecert / compact.html
Last active December 4, 2021 14:07
under 1000 bytes p2p webrtc messaging example (913b)
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:"stun:stun.stunprotocol.org:3478"}]}),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:"+e.data)},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(e.channel),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
geek-at / trash.sh
Created August 13, 2020 07:27
The script used to trash a banking phishing site
#!/bin/bash
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))")
Rank Type Prefix/Suffix Length
1 Prefix my+ 2
2 Suffix +online 6
3 Prefix the+ 3
4 Suffix +web 3
5 Suffix +media 5
6 Prefix web+ 3
7 Suffix +world 5
8 Suffix +net 3
9 Prefix go+ 2
@sterlu
sterlu / Savings APR-APY conversion.js
Created February 24, 2020 14:54
Convert between APR & APY yearly returns
const SECONDS_PER_YEAR = 365.25 * 24 * 60 * 60;
const BLOCKS_IN_A_YEAR = SECONDS_PER_YEAR / 14;
/**
* Formula source: http://www.linked8.com/blog/158-apy-to-apr-and-apr-to-apy-calculation-methodologies
*
* @param interest {Number} APY as percentage (ie. 6)
* @param frequency {Number} Compounding frequency (times a year)
* @returns {Number} APR as percentage (ie. 5.82 for APY of 6%)
*/

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
CGA1123 / initializer.rb
Last active January 14, 2020 12:21
umbra setup example
# 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
end