Skip to content

Instantly share code, notes, and snippets.

View andy0130tw's full-sized avatar
🍌
why no 🍆

Andy Pan andy0130tw

🍌
why no 🍆
View GitHub Profile
#include <stdio.h>
#include <string.h>
#ifdef ofst
for i in range(12):
MID, ofst, _ = 12, lambda o, i: int(o[i], 16), """
#else
#define ofst(o, i) 0
int main () { int t; char *s, *_; for (int i = 0; i < 12; i++) {
s = " """;
t = (int)(9+(i%3+(int)(i/3))*2-(i>8)*(2*(i-8)+2)) + ofst("466975754C32", i);
-- programming
data Nat : Set where
zero : Nat
suc : Nat → Nat
_+_ : Nat → Nat → Nat
zero + n = n
suc m + n = suc (m + n)
@HenryYang
HenryYang / tokenPaymentBanks.md
Last active January 2, 2023 17:45 — forked from shyuan/tokenPaymentBanks.md
在台灣的國際 Pay 信用卡與金融卡支援銀行對照表

對應表

銀行/支付系統 Apple Pay Google Pay Samsung Pay Garmin Pay Fitbit Pay 支援家數
國泰世華銀行 5
國泰世華銀行 - 金融卡 5
中國信託銀行 5
中國信託銀行 - 金融卡 3
台新國際商業銀行 5
台新國際商業銀行 - 金融卡 5
聯邦銀行 5
@serg0x
serg0x / material-design-shadows.css
Last active July 7, 2023 13:33
Google material design elevation system shadows as css. Based on https://material.io/design/environment/elevation.html#default-elevations Exported with Sketchapp from the Google material design theme editor plugin "Baseline" theme.
/* Shadow 0dp */
box-shadow: none;
/* Shadow 1dp */
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20);
/* Shadow 2dp */
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20);
/* Shadow 3dp */
@tomnomnom
tomnomnom / alert.js
Last active April 23, 2024 20:42
Ways to alert(document.domain)
// How many ways can you alert(document.domain)?
// Comment with more ways and I'll add them :)
// I already know about the JSFuck way, but it's too long to add (:
// Direct invocation
alert(document.domain);
(alert)(document.domain);
al\u0065rt(document.domain);
al\u{65}rt(document.domain);
window['alert'](document.domain);
@rfikki
rfikki / rinkeby-peers-latest.txt
Last active December 9, 2020 04:21
Updated DEC/08/2020 - IMPORTANT RUN THE LATEST RELEASE OF THE CLIENT - https://geth.ethereum.org/downloads/
admin.addPeer("enode://343149e4feefa15d882d9fe4ac7d88f885bd05ebb735e547f12e12080a9fa07c8014ca6fd7f373123488102fe5e34111f8509cf0b7de3f5b44339c9f25e87cb8@52.3.158.184:30303");
admin.addPeer("enode://3338fd63203ca8f079c79c3fc5bcdaa9ee8ad8f64a48ddfb0022b77f623768eb08e82576fc1c8356a0f588ad9162989704d16e9fc0e6f0bd9feb8f7e80ed1b5f@5.189.149.113:35555");
@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active May 20, 2024 16:10
Hyperlinks in Terminal Emulators
@sliminality
sliminality / Default (OSX).sublime-keymap
Last active October 8, 2023 04:47
Racket and Sublime Text 3
{
// Evaluate file in the open SublimeREPL.
// Depends on you creating the Packages/User/EvalInREPL.sublime-macro file.
{ "keys": ["super+r"], "command": "run_macro_file", "args": { "file": "Packages/User/EvalInREPL.sublime-macro" },
"context": [
{ "key": "selector", "operator": "equal", "operand": "source.elm" }
]
},
// Reindent selection on tab
@Inndy
Inndy / super_decoder.js
Last active October 19, 2021 05:34
Decode jsfuck / aaencode / jjencode
!function () {
var global = this;
var old_eval = global.eval;
var old_const = global.Function.prototype.constructor;
global.Function.prototype.constructor = function (code) {
console.log('Function Constructor: ' + code);
return old_const(code);
};
global.eval = function (code) {
console.log('EVIL: ' + code);
@mimoo
mimoo / linear_approx_table.py
Last active May 10, 2024 17:21
calculate linear approximation tables for Sboxes
import sys
# sbox from the tutorial
#sbox = [0xe, 4, 0xd, 1, 2, 0xf, 0xb, 8, 3, 0xa, 6, 0xc, 5, 9, 0, 7]
sbox = [0xf, 3, 0xa, 6, 4, 1, 0xb, 9, 0xe, 5, 0, 0xd, 2, 0xc, 7, 8]
SIZE_SBOX = len(sbox)
# compute the linear approximation for a given "input = output" equation
def linearApprox(input_int, output_int):
total = 0