Skip to content

Instantly share code, notes, and snippets.

View felipepodesta's full-sized avatar
👨‍💻
Stairway To Heaven

Felipe Podestá felipepodesta

👨‍💻
Stairway To Heaven
View GitHub Profile
@jamal-abbasi
jamal-abbasi / account-type.resolver.ts
Created July 31, 2022 08:55
Unit Testing GraphQL resolver in nest.js
import { Resolver, Query, Args, Mutation } from '@nestjs/graphql';
import { KeyValInput } from '@common/inputs/key-val.input';
import { CurrentUser, Fields } from '@common/decorators';
import { ICurrentUser } from '@common/interfaces';
import { AccountTypeService } from '@app/v1/account-type/account-type.service';
import { AccountType, AccountTypeWithPagination } from '@app/v1/account-type/account-type.model';
import { AccountTypeFilterParams, AccountTypeUpdateDto, ApproveAccountTypeInput } from './account-type.dto';
import { PaginationParams, SortingParam } from '@rubix/common';
@defparam
defparam / MutateMethods.py
Last active July 22, 2024 20:09
Example of using Turbo Intruder in a "listen and attack" mode. Because turbo intruder's jython interpreter is technically inside burp you can have turbo intruder scripts use the plugin API. Here we use burp.IProxyListener to intercept requests and reissue them inside turbo intruder mutating the method.
from threading import Thread
import time
class TrafficMagnet(burp.IProxyListener):
def __init__(self):
callbacks.registerProxyListener(self)
self._helpers = callbacks.getHelpers()
self._callbacks = callbacks

Single-host Minio Setup

Docker-Compose single-host Minio S3 setup using Traefik (Let's Encrypt with DNS-01 challenge via Cloudflare) for TLS offloading.

Tested on Ubuntu 20.04.

Host Prerequisites

Run all commands shown here with root or prepend a sudo to the regarding commands which require higher privileges.

Install Docker

@j-martinez-dev
j-martinez-dev / wsl.sh
Created October 5, 2021 14:55
Development installation wsl
echo "Please write your name:"
read NAME
echo "Please write your personal email:"
read PERSONAL
echo "Please write your work email:"
read WORK
init() {
@bmatthewshea
bmatthewshea / certbot_pip_install-debian_ubuntu.md
Last active October 22, 2024 20:39
Debian/Ubuntu - CERTBOT without SNAP/SNAPD

CERTBOT - Install using Python PIP

Install Certbot using Python PIP (Package Installer for Python) - without using SNAP, APT or SYSTEMD. (Debian/Ubuntu)


This guide will help you install LetsEncrypt / Certbot using venv PIP under Debian/Ubuntu.

  • This guide has been tested up to Debian 12 / Bookworm.
@gquittet
gquittet / setup-wsl.sh
Last active November 16, 2021 20:35
Script to setup WSL
#!/usr/bin/env bash
# Ensure script is running with bash
if [ -z "$BASH_VERSION" ]; then
echo "You need to run this script with bash!"
exit 1
fi
###############################################################################
# PREPARATION
@jkehelwala
jkehelwala / clearspace
Created August 30, 2021 16:55
Clean space in Ubuntu
#!/bin/bash
## References: https://itsfoss.com/free-up-space-ubuntu-linux/
function remove_snap_revs() {
set -eu
snap list --all | awk '/disabled/{print $1, $3}' |
while read snapname revision; do
snap remove "$snapname" --revision="$revision"
done
@sonuame
sonuame / clean.sh
Last active November 16, 2021 03:24
Ubuntu Cleanup
#!/bin/sh -eux
# Delete all Linux headers
dpkg --list \
| awk '{ print $2 }' \
| grep 'linux-headers' \
| xargs apt-get -y purge;
# Remove specific Linux kernels, such as linux-image-3.11.0-15-generic but
# keeps the current kernel and does not touch the virtual packages,
# e.g. 'linux-image-generic', etc.
dpkg --list \
@mvanga
mvanga / music_theory.py
Last active April 24, 2024 19:10
Basic Music Theory in ~200 Lines of Python
# The code for my article with the same name. You can find it at the URL below:
# https://www.mvanga.com/blog/basic-music-theory-in-200-lines-of-python
# MIT License
#
# Copyright (c) 2021 Manohar Vanga
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
@vassalloandrea
vassalloandrea / ci.yml
Last active August 5, 2021 01:00
React CI GH actions
# CI name
name: Run linters and specs
# The on key is used to define when
# the CI should be triggered, aka Event
on:
# When someone push or merge a pull request
# inside the main branch
push:
branches: