Skip to content

Instantly share code, notes, and snippets.

@0xdevalias
0xdevalias / reverse-engineering-webpack-apps.md
Last active April 25, 2024 02:11
Some notes and techniques for reverse engineering Webpack (and a little bit about React/Vue) apps
@wareya
wareya / spi_recorder.ino
Last active April 25, 2024 02:11
long SPI message recorder - rasberry pi pico (rp2040), arduino IDE .ino file (C++)
// wiring example for ripping a PMW3360 SROM: https://i.imgur.com/EspAlvz.jpeg
// set the board to 240mhz or higher for best results (WARNING: higher than 240mhz only works with USB if you overvolt the MCU)
// this implements reading SPI mode 3. if you want a different mode, you need to edit these two lines:
// uint32_t clockval = (1 << pin_clock);
// if (newclock && !clockval && buff_i < buffsize)
#include <pico/stdlib.h>
#define buffsize 50000
@eminetto
eminetto / rfc.md
Created May 15, 2021 15:42
Template de RFC

Título

Descrição do problema

Devemos explicar o problema claramente e identificar detalhes adicionais que a equipe precise saber. Devemos aqui descrever o contexto, o que foi feito até agora e o estado atual.

A descrição também serve como uma trilha à qual podemos voltar no futuro para entender o raciocínio que tínhamos na época e ver quais restrições e requisitos mudaram.

Possíveis abordagens

@michabbb
michabbb / PestPHP architecture testing.php
Created April 21, 2024 20:22
PestPHP architecture testing
<?php
/** @see https://twitter.com/garyclarketech/status/1781605977101644015/photo/1 **/
test('debugs are removed')
->expect(['dd', 'dump', 'var_dump'])
->not->toBeUsed();
test('CommandInterface is implemented where is should be')
->expect('App\Command')
@markthiessen
markthiessen / getWeeksInMonth.js
Last active April 25, 2024 02:05
JavaScript - get weeks in a month as array of start and end days
//note: month is 0 based, just like Dates in js
function getWeeksInMonth(year, month) {
const weeks = [],
firstDate = new Date(year, month, 1),
lastDate = new Date(year, month + 1, 0),
numDays = lastDate.getDate();
let dayOfWeekCounter = firstDate.getDay();
for (let date = 1; date <= numDays; date++) {
@animoplex
animoplex / SimpleTriggerFade.jsx
Created December 22, 2018 00:59
Simple Trigger Fade - After Effects Expression by Animoplex
// Simple Trigger Fade - Created by Animoplex: www.animoplex.com
// Repeat a fade animation multiple times using markers to trigger the animation.
// Full Tutorial: https://www.youtube.com/watch?v=B_3XS2-VWOM
fadeFrames = 30; m = 0; t = time;
if (marker.numKeys > 0) {
m = marker.nearestKey(time).index;
tag = marker.key(m).comment;
if (tag == "In") { t = marker.key(m).time - time }
else if (tag == "Out") { t = time - marker.key(m).time }
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active April 25, 2024 02:01
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@abirfo
abirfo / git-http-proto.txt
Last active April 25, 2024 02:01 — forked from schacon/git-http-proto.txt
Git HTTP transport protocol documentation
HTTP transfer protocols
=======================
Git supports two HTTP based transfer protocols. A "dumb" protocol
which requires only a standard HTTP server on the server end of the
connection, and a "smart" protocol which requires a Git aware CGI
(or server module). This document describes both protocols.
As a design feature smart clients can automatically upgrade "dumb"
protocol URLs to smart URLs. This permits all users to have the
@bettysteger
bettysteger / Editorjs.vue
Last active April 25, 2024 01:58
Vue 3 SFC for Editor.js using v-model with own custom vue component
<template>
<div class="editorjs" ref="htmlelement"></div>
</template>
<script setup>
import EditorJS from '@editorjs/editorjs';
import EmbedTool from '@editorjs/embed';
import ListTool from '@editorjs/list';
import ImageTool from '@editorjs/image';
import VideoTool from './editorjs/video.js';
import { onMounted, onUnmounted, ref, watch } from 'vue';