Skip to content

Instantly share code, notes, and snippets.

@QuanTrieuPCYT
QuanTrieuPCYT / rmjavacheck
Last active April 19, 2024 10:36
Script to remove JavaCheck.jar on Minecraft Launcher on macOS Platforms
#!/bin/bash
file_path="~/Library/Application
Support/minecraft/launcher/launcher.bundle/Contents/Resources/JavaCheck.jar"
if [ -e "$file_path" ]; then
rm -R "$file_path"
echo "Minecraft Launcher's JavaCheck.jar deleted!"
else
echo "Minecraft Launcher's JavaCheck.jar not found!"
@QuanTrieuPCYT
QuanTrieuPCYT / FPTU.md
Created April 15, 2024 13:04
FPTU Kỳ Truyện - Đại học FPT: khi sinh viên gian lận và hack vào server trường

Đại học FPT: khi sinh viên gian lận và hack vào server trường

Lấy từ nguồn: https://tinhte.vn/thread/dai-hoc-fpt-khi-sinh-vien-gian-lan-va-hack-vao-server-truong.1091706/


Trường Đại Học FPT (FU) số 8 Tôn Thất Thuyết - Cầu Giấy - Hà Nội (Toà nhà Detect - đối diện bến xe Mĩ Đình) Trong 3 năm nay, FU có thực hiện việc thi cử online bằng phần mềm chuyên dụng của trường, được nhà trường đặt hàng của Phan Trường Lâm (LamPT) có 2 phiên bản đều được code bằng C# .NET:
1- bản EOS Client dùng thi môn Business English (BE).
2- bản IT Client thi các môn Software Engineering: Java, C#, C/C+- Computer Network, Operating System (OS), Introduction to Database, ...

@QuanTrieuPCYT
QuanTrieuPCYT / securebootsign.sh
Created April 19, 2024 10:33
Debian Linux Manual Secure Boot signing script
#!/bin/bash
# DPKG Post-Install Script to sign vmlinuz kernel images and EFI executable binaries for Secure Booting with custom certificates
# Required for full OpenCore Secure Boot (for example: you want to use Secure Boot in Windows 11 for Valorant, just like me!)
#
# Requirement:
# - You have followed this guide: https://github.com/perez987/OpenCore-and-UEFI-Secure-Boot
# - Custom ISK.key and ISK.pem in a folder of choice, I will just name it /path/to/securebootkeys as in this script
# - You are running Debian Linux, with `sbsigntool` installed (`sudo apt install sbsigntool --no-install-recommends -y`)
# - Have a brain
@EDDxample
EDDxample / Lattice Basics.ipynb
Last active April 19, 2024 10:32
Lattice Basics for RNG Seed finding
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@qoomon
qoomon / conventional_commit_messages.md
Last active April 19, 2024 10:31
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Create Free AWS Account

Create free AWS Account at https://aws.amazon.com/

2. Create and Lauch an EC2 instance and SSH into machine

I would be creating a t2.medium ubuntu machine for this demo.

@loknop
loknop / writeup.md
Created December 30, 2021 14:59
Solving "includer's revenge" from hxp ctf 2021 without controlling any files

Solving "includer's revenge" from hxp ctf 2021 without controlling any files

The challenge

The challenge was to achieve RCE with this file:

<?php ($_GET['action'] ?? 'read' ) === 'read' ? readfile($_GET['file'] ?? 'index.php') : include_once($_GET['file'] ?? 'index.php');

Some additional hardening was applied to the php installation to make sure that previously known solutions wouldn't work (for further information read this writeup from the challenge author).

I didn't solve the challenge during the competition - here is a writeup from someone who did - but since the idea I had differed from the techniques used in the published writeups I read (and I thought it was cool :D), here is my approach.

@shamil
shamil / mount_qcow2.md
Last active April 19, 2024 10:28
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@darrarski
darrarski / CustomIntensityVisualEffectView.swift
Last active April 19, 2024 10:25
UIVisualEffectView subclass that allows to customise effect intensity
import UIKit
final class CustomIntensityVisualEffectView: UIVisualEffectView {
/// Create visual effect view with given effect and its intensity
///
/// - Parameters:
/// - effect: visual effect, eg UIBlurEffect(style: .dark)
/// - intensity: custom intensity from 0.0 (no effect) to 1.0 (full effect) using linear scale
init(effect: UIVisualEffect, intensity: CGFloat) {
theEffect = effect
@davidjguru
davidjguru / Blocks.md
Created November 12, 2020 17:47 — forked from bdlangton/Blocks.md
Drupal 8 programmatic solutions

Render custom blocks

$bid = 'myblock';
$block = \Drupal\block_content\Entity\BlockContent::load($bid);
$render = \Drupal::entityTypeManager()->getViewBuilder('block_content')->view($block);

Render plugin blocks

$block_manager = \Drupal::service('plugin.manager.block');