Skip to content

Instantly share code, notes, and snippets.

View tatupesonen's full-sized avatar

Tatu Pesonen tatupesonen

View GitHub Profile
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active June 28, 2024 03:43
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@jjvillavicencio
jjvillavicencio / setup.sh
Last active May 26, 2024 18:37
Install Android SDK on Windows Bash (WSL)
cd /home/<user>/
sudo apt-get install unzip
wget https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
unzip sdk-tools-linux-4333796.zip -d Android
rm sdk-tools-linux-4333796.zip
sudo apt-get install -y lib32z1 openjdk-8-jdk
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
export PATH=$PATH:$JAVA_HOME/bin
printf "\n\nexport JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64\nexport PATH=\$PATH:\$JAVA_HOME/bin" >> ~/.bashrc
cd Android/tools/bin
@vtenq
vtenq / git-workflow.md
Last active June 10, 2024 09:19
Git workflow with conventional commits and semantic auto release

Git workflow with conventional commits and semantic auto release

This is an adoptation of Git flow by Vincent Driessen with conventional commits and semantic release.

The main concepts

At the core, the development model is greatly inspired by existing models out there. The central repo holds two main branches with an infinite lifetime:

@tatupesonen
tatupesonen / start-tekken.bat
Last active May 22, 2020 17:01
Remove Gallery and Story folders and start TEKKEN 7
::USAGE
::Make a start-tekken.bat file and paste the contents of this file inside of it.
::Replace the gamePath folder value with your TEKKEN 7 folder location.
::Example:
::set gamePath=C:\Program Files (x86)\Steam\steamapps\common\TEKKEN 7 for the default TEKKEN 7 install.
@echo off
set gamePath=C:\Program Files (x86)\Steam\steamapps\common\TEKKEN 7
IF EXIST "%gamePath%\TekkenGame\Content\Movies\Gallery" (
echo Removing Gallery folder...
@tatupesonen
tatupesonen / merge.js
Last active January 11, 2022 09:02
Object specific merge
const util = require("util");
const { performance } = require("perf_hooks");
// Input data is like this
const exampleInput = [
{ 9668: { "Fa0/11": { in_traffic: "1000" } } },
{ 9668: { "Fa0/11": { out_traffic: "900" } } },
{ 9628: { "Fa0/16": { in_traffic: "800" } } },
];
import { useMemo } from 'react';
import { BigNumber } from '@ethersproject/bignumber';
import { useWeb3React } from '@web3-react/core';
import { Contract } from '@ethersproject/contracts';
import useSWR from 'swr';
const uniswapV3PositionManagerAbi = [
{
inputs: [
{
@nwunderly
nwunderly / The_PirateStealer_Saga.md
Last active January 20, 2023 01:53
The_PirateStealer_Saga.md

The PirateStealer Saga: A tale of love, war, betrayal, and revenge

Intro

The following document chronicles my discovery of the incredibly riveting lore behind a particular open-source malware project.

@joeyslalom
joeyslalom / github-docker-artifact-registry.yaml
Created March 16, 2022 00:08
GitHub Action - docker build and push to Artifact Registry
# 1. Create service account
#. * Service Account Token Creator
#. * Artifact Registry Writer
# 2. Generate service account key
#. * In GitHub project -> Settings -> Secrets -> Actions -> New Repository Secret
#. Name: GCP_CREDENTIALS
#. Value: key.json contents
# 3. Create repo in artifact repository
#. * Name: $env.REPOSITORY below
#. * Region: $env.GAR_LOCATION below