Skip to content

Instantly share code, notes, and snippets.

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 12, 2024 14:41
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@wojteklu
wojteklu / clean_code.md
Last active May 12, 2024 14:39
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@marcoandre1
marcoandre1 / SSH-configuration-github-gitlab.md
Last active May 12, 2024 14:38
Managing SSH keys for Github and Gitlab

Managing SSH keys for Github and Gitlab

NOTICE: This guide will help you set ssh keys for GitHub and GitLab. However, this is not going to change your commit user.name or user.email. If you need to change those for specific repositories, just run the following commands while in your repository:

git config user.name "Your Name Here"
git config user.email your@email.com

For more info, see this answer. Also, keep in mind this only changes the .git folder inside your repository which never gets added/committed/pushed/uploaded.

I recently had to manage two ssh keys (one for Github and one for Gitlab). I did some research to find the best solution. I am justing putting the pieces together here.

@HiFiPhile
HiFiPhile / main.c
Last active May 12, 2024 14:38
TinyUSB uac2_speaker_fb minimal example on STM32F723E-DISCO
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 Jerzy Kasenberg
* Copyright (c) 2023 HiFiPhile
*
* 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
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
@aveuiller
aveuiller / packageAndroid.sh
Last active May 12, 2024 14:38
Extract the Android .odex files and package a new android.jar with the retrieved classes
#!/bin/sh
##
# Usage:
# ./convert.sh /path/to/framework /path/to/out $apiVersion $arch
#
# $arch is mandatory only in case of an ART system and defines the boot folder to use (arm, x86, x86_64).
##
frameworkDir=$1
# Final output directory
@myrfy001
myrfy001 / Highlight DOM elements (include sub DOM) when mouse hover over it in Chrome or Firefox using devTools.md
Created May 14, 2018 02:59
Highlight DOM elements (include sub DOM) when mouse hover over it in Chrome or Firefox using DevTools

Paste the following code into the console panel of the DevTools window of Chrome or Firefox.

The style sheet came from (Web Scraper)[http://webscraper.io/] plugin for Chrome

It is useful for analyse a page layout and you can extend it to select preferred dom elements.

function addStyleString(str) {
    var node = document.createElement('style');
@evsar3
evsar3 / hexdump.ts
Created October 4, 2023 17:03
HexDump for TypeScript/Javascript
function hexdump (data: Uint8Array, bytesPerLine = 16): string {
const result: string[] = []
for (let i = 0; i < data.length; i += bytesPerLine) {
const chunk = data.slice(i, i + bytesPerLine)
const address = i.toString(16)
.padStart(8, '0')
const hex = Array.from(chunk, byte => byte.toString(16)
@GregLando113
GregLando113 / random IDAPython functions.py
Created April 15, 2022 12:55
stuff to take advantage of classinformer, label all functions and find likely constructors for all RTTI types
import idaapi
import idautils
import ida_funcs
import ida_allins
import ida_ua
import ctypes as C
NETNODE_NAME = '$ClassInformer_node'
@kimus
kimus / ufw.md
Created March 2, 2014 22:46
NAT and FORWARD with Ubuntu’s ufw firewall

UFW

I use Ubuntu’s Uncomplicated firewall because it is available on Ubuntu and it's very simple.

Install UFW

if ufw is not installed by default be sure to install it first.