Skip to content

Instantly share code, notes, and snippets.

View suicide's full-sized avatar

suiiii suicide

  • Hamburg, Germany
View GitHub Profile
@suicide
suicide / Belt.t.sol
Last active April 16, 2024 14:16
ForTube BeltBtc Withdraw fix
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import {Test, console} from "forge-std/Test.sol";
contract BeltTest is Test {
address private fortubeProxyAddress = 0xc78248D676DeBB4597e88071D3d889eCA70E5469;
address private fortubeProxyAdmin = 0x7354092C6032FC2f1B8a43F3A55365be1Ac0348A;
ForTubeBankController private fortubeBankController;
@suicide
suicide / WarningAccordion.stories.svelte
Created March 21, 2024 01:49
tree sitter crash example svelte file
<script lang="ts" context="module">
import WarningAccordion from '$lib/components/ui2/WarningAccordion.svelte';
import {type WarningMessage} from '$lib/components/ui2/WarningAccordion.svelte';
const messages: Array<WarningMessage> = [
{
type: 'error',
title: 'error',
text: 'something horrible'
},
@suicide
suicide / install-arch.md
Created October 9, 2022 11:35 — forked from mjnaderi/install-arch.md
Install Arch Linux with Full Disk Encryption (LVM on LUKS)
@suicide
suicide / 1_Arch_installation.md
Created October 9, 2022 11:35 — forked from kmikko/1_Arch_installation.md
Arch Linux installation guide with LVM on LUKS

Arch Linux Installation Guide

Create bootable USB

Download Arch Linux iso file: https://www.archlinux.org/download/

Plug and identify your USB flash drive

lsblk

Unmount if necessary

@suicide
suicide / full-disk-encryption-arch-uefi.md
Created October 9, 2022 11:35 — forked from huntrar/full-disk-encryption-arch-uefi.md
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@suicide
suicide / Merger.scala
Created July 20, 2019 17:58
a zipper-like merger function with tailrec
object Merger {
def merge[T](a: List[T], b: List[T]): List[T] = {
@scala.annotation.tailrec
def innerMerge(result: List[T], a: List[T], b: List[T]): List[T] = {
(a, b) match {
case (Nil, x) => result ++ x
case (x, Nil) => result ++ x
case (aHead :: aTail, bHead :: bTail) => innerMerge(List(aHead, bHead) , aTail, bTail)
@suicide
suicide / Solution.java
Created February 5, 2015 00:21
Another game of life from an interview
import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;
/**
* @author psy
*
*/
public class Solution {
@suicide
suicide / Solution.java
Created February 5, 2015 00:20
Game of Life
/**
*
*/
/**
* @author psy
*
*/
public class Solution {
@suicide
suicide / pom.xml
Created January 28, 2015 01:12
TMash pom
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>TMash</groupId>
<artifactId>TMash</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<!DOCTYPE html>
<!--[if lt IE 7]><html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]-->
<!--[if (IE 7)&!(IEMobile)]><html class="no-js lt-ie9 lt-ie8" lang="en"><![endif]-->
<!--[if (IE 8)&!(IEMobile)]><html class="no-js lt-ie9" lang="en"><![endif]-->
<!--[if (IE 9)]><html class="no-js ie9" lang="en"><![endif]-->
<!--[if gt IE 8]><!--> <html lang="en-US"> <!--<![endif]-->
<head>
<!-- Meta Tags -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />