Skip to content

Instantly share code, notes, and snippets.

@alfongj
alfongj / article.md
Last active October 19, 2023 06:08
AA blog example

Title: Advancing Ethereum: A Deep Dive into Account Abstraction and ERC-4337

In recent times, a specialized group of visionaries, known as the '4337Mafia,' has garnered attention in the Ethereum community. Their mission? To pioneer the integration of Account Abstraction (AA), particularly ERC4337 or Smart Contract Wallets, on the Ethereum blockchain. Let's delve into the compelling developments and discussions surrounding this initiative.

DALL·E 2023-10-19 02 06 43 - Digital illustration of a modern toolbox open to reveal tools labeled 'Bundler APIs', 'Gas Manager APIs', and 'Smart Wallet'  A developer in the backg

Unveiling Account Abstraction and ERC-4337

Account Abstraction emerges as a robust solution to myriad challenges associated with Ethereum's smart contracts. By establishing distinct transaction validation and execution standards, AA dismisses the traditional 'one-size-fits-all' approac

@alfongj
alfongj / datgui-build.js
Last active August 15, 2021 08:02 — forked from heaversm/datgui-build.js
Automatically build a dat gui from a javascript object
const config = { //SAMPLE OBJECT - replace this with your data object
fastMode: true,
backgColor: "#a42e27",
foregColor: "#dcafad",
sun: {
x: 140,
y: 155,
radius: 240,
color: "#e3d5c4",
},
@alfongj
alfongj / robbin-the-robin.js
Created December 31, 2020 00:04
Export Robinhood trades to TSV
/*
* Instructions:
* 1. Go to https://robinhood.com/account/history in Chrome
* 2. Scroll down to the bottom to ensure all transactions you care about are rendered
* 3. Open the Chrome Dev Tools window (Windows — Ctrl + Shift + I, Mac — Option + Cmd + I)
* 4. Paste this code into the console
*/
let csv = "Section\tDate\tName\tTotal\tNumber of Shares/Contracts\tPrice per share\n";
const sections = document.querySelectorAll('section');
FirebaseUser user = mAuth.getCurrentUser(); // mAuth is your current firebase auth instance
user.getToken(true).addOnCompleteListener(this, new OnCompleteListener<GetTokenResult>() {
@Override
public void onComplete(@NonNull Task<GetTokenResult> task) {
if (task.isSuccessful()) {
Log.d(TAG, "token=" + task.getResult().getToken());
} else {
Log.e(TAG, "exception=" +task.getException().toString());
}
@alfongj
alfongj / designer.html
Last active August 29, 2015 14:21
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-scroll-header-panel/core-scroll-header-panel.html">
<polymer-element name="my-element">
<template>
<style>
:host {
width: 480px;
@alfongj
alfongj / Android .gitignore
Last active August 29, 2015 14:19
Android .gitignore
# Android studio crap
**/.idea/workspace.xml **/.idea/tasks.xml
.idea/workspace.xml
.idea/tasks.xml
.idea/datasources.xml
.idea/dataSources.ids
.idea/libraries/
# Mac crap
.DS_Store
@alfongj
alfongj / gist:d671aa7c3937ac0a4d8e
Last active August 29, 2015 14:15
Recursos para aprender a programar
Vistos en la presentación "El Mundo Está Hecho de Código"
=========================================================
1. If This Then That -> https://ifttt.com
El #dameGato https://ifttt.com/recipes/257693-toma-gatos
2. Flappy Bird en scratch -> http://scratch.mit.edu/
Video tutorial -> Parte 1: https://www.youtube.com/watch?v=QEwRXqMHJzk
Parte 2: https://www.youtube.com/watch?v=KUx2zGqKmP4&feature=youtu.be&hd=1
@alfongj
alfongj / arduino.ino
Created April 20, 2013 08:14
S107 IR-RC Helicopter controller via Processing and Arduino Mega. Adapted from http://www.diyphonegadgets.com/2012/04/tutorial-how-to-control-ir-helicopter.html It would be great if someone rewrote the Arduino part in a better way, using timers or one of the IR libraries out there :D
//Arduino code to control a helicotper.
int IRledPin = 12; // Connect IR LED to pin 12
int incomingByte = 0;
String incomingString;
int pulseValues[33];
int pulseLength = 0;
void setup() {
// initialize the IR digital pin as an output:
pinMode(IRledPin, OUTPUT);
@alfongj
alfongj / db_daemon.sh
Last active December 12, 2015 09:49 — forked from aarvay/db_daemon.sh
#!/bin/bash
#
# Bash hack to install Dropbox Daemon
# @author : Vignesh Rajagopalan
#
###
cat <<EOF | sed -e "s,%,$,g" >/etc/init.d/dropbox
### BEGIN INIT INFO
# Provides: dropbox
@alfongj
alfongj / Slider-shorter.js
Created February 15, 2012 18:58
Shorter version of Jeffrey Way's jQuery slider done in episode 15 of Learn jQuery in 30 days
(function($) {
var sliderUL = $('div.slider').css('overflow', 'hidden').children('ul'),
imgs = sliderUL.find('img'),
imgWidth = imgs[0].width, // 600
imgsLen = imgs.length, // 4
current = 0, //0: first
$('#slider-nav').show().find('button').on('click', function() {
var direction = $(this).data('dir'),
move = ( direction === 'next' ) ? 1 : -1; //1 forward, -1 backward