Skip to content

Instantly share code, notes, and snippets.

View fpbrault's full-sized avatar
🐈

Felix Perron-Brault fpbrault

🐈
View GitHub Profile
@pudquick
pudquick / brew.md
Last active June 11, 2024 22:02
Lightly "sandboxed" homebrew on macOS

brew is a bad neighbor

This isn't a guide about locking down homebrew so that it can't touch the rest of your system security-wise.

This guide doesn't fix the inherent security issues of a package management system that will literally yell at you if you try to do something about "huh, maybe it's not great my executables are writeable by my account without requiring authorization first".

But it absolutely is a guide about shoving it into its own little corner so that you can take it or leave it as you see fit, instead of just letting the project do what it likes like completely taking over permissions and ownership of a directory that might be in use by other software on your Mac and stomping all over their contents.

By following this guide you will:

  • Never have to run sudo to forcefully change permissions of some directory to be owned by your account
@Smephite
Smephite / quest9.md
Last active March 9, 2023 02:28
Writeup of Stellar puzzle challenge

Puzzle #9 'The clueless Multisig'

This is a writeup and example implementation for puzzle #9 by https://nebolsin.keybase.pub/puzzles/

Our clue was given in form of the pubkey GBW7N7EXR5MV4A34N7LEQGSKZMFEJGW4SQWHUPXGDX2JCGNJH2RXKHUL

When looking up the accounts state we find an threshold setting of 2/3/4, 2 active signers (and one to clawback). The master key has been removed.

The account also posseses an data entry containing

More puzzles: https://erayd.keybase.pub/puzzles.html. Have fun!

@Smephite
Smephite / claim_shitasset.py
Last active February 12, 2022 05:59
Use this script to claim all sellable tokens offered to you by claimable balances. Now uses ^6.0.0b
from stellar_sdk import Server, Keypair, TransactionBuilder, Network
import stellar_sdk
from stellar_sdk.asset import Asset
from stellar_sdk.operation.create_claimable_balance import ClaimPredicate
from stellar_sdk.operation.path_payment_strict_send import PathPaymentStrictSend
from stellar_sdk.signer import Signer
import datetime, decimal
print(f"Using stellar SDK v{stellar_sdk.__version__}")
@mjclemente
mjclemente / app.e2e-spec.ts
Created August 4, 2020 21:30 — forked from firxworx/app.e2e-spec.ts
NestJS Integration/E2E Testing Example with TypeORM, Postgres, JWT
import { Test, TestingModule } from '@nestjs/testing'
import { INestApplication, LoggerService } from '@nestjs/common'
import * as request from 'supertest'
import { AppModule } from './../src/app.module'
class TestLogger implements LoggerService {
log(message: string) {}
error(message: string, trace: string) {}
warn(message: string) {}
debug(message: string) {}
@whistler
whistler / ofx2csv.py
Created April 19, 2015 23:32
Convert QFX/OFX to CSV
from csv import DictWriter
from glob import glob
from ofxparse import OfxParser
DATE_FORMAT = "%m/%d/%Y"
def write_csv(statement, out_file):
print "Writing: " + out_file
fields = ['date', 'payee', 'debit', 'credit', 'balance']
with open(out_file, 'w') as f: