Skip to content

Instantly share code, notes, and snippets.

View ba0f3's full-sized avatar
🇻🇳
#VietnamLeavesNoOneBehind

Huy Doan ba0f3

🇻🇳
#VietnamLeavesNoOneBehind
View GitHub Profile
@Washi1337
Washi1337 / Program.cs
Last active April 14, 2023 10:50
Injecting arbitrary code into PE Files using AsmResolver - https://washi.dev/blog/posts/import-patching/
using AsmResolver;
using AsmResolver.PE;
using AsmResolver.PE.Code;
using AsmResolver.PE.File;
using AsmResolver.PE.File.Headers;
using AsmResolver.PE.Imports;
using AsmResolver.PE.Imports.Builder;
using AsmResolver.PE.Platforms;
using AsmResolver.PE.Relocations;
using AsmResolver.PE.Relocations.Builder;
@tahazayed
tahazayed / clean.docker.registry.sh
Last active December 12, 2022 08:53 — forked from mohamed-el-habib/clean.docker.registry.sh
bash script to delete images from docker registry using search keyword
#!/bin/bash
# Please follow this artical to allow registry deleation https://azizunsal.github.io/blog/post/delete-images-from-private-docker-registry/#override-the-registry-configuration
# Usage ./clean.docker.registry.sh -r registryUrl -u login -f stringFilter -t tagToKeep
SHORT=r:,u:,f:,k:,h
LONG=dockerRegistry:,user:,imagesFilter:,keepTag:,help
OPTS=$(getopt -a -n clean.docker.regisrty.sh --options $SHORT --longoptions $LONG -- "$@")
eval set -- "$OPTS"
@markasoftware
markasoftware / enterprise_token.rb
Last active July 16, 2024 09:39
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.
@trangnth
trangnth / wazuh-alert-telegram.md
Created December 6, 2019 08:41
Config wazuh alert via telegram
@Karewan
Karewan / Android: TLS 1.3 with OkHttp + Conscrypt on all Android versions (Tested on 4.1+)
Last active July 12, 2024 17:32
Android: TLS 1.3 with OkHttp and Conscrypt on all Android versions (Tested on 4.1+)
// Android 4.1+
dependencies {
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
implementation 'org.conscrypt:conscrypt-android:2.5.2'
}
// Android 5.0+
dependencies {
implementation 'com.squareup.okhttp3:okhttp:4.10.0'
implementation 'org.conscrypt:conscrypt-android:2.5.2'
@pamolloy
pamolloy / README.md
Last active July 4, 2024 15:43
Mesh network using VXLAN over Wireguard
@ba0f3
ba0f3 / make-vmdk.sh
Created January 5, 2018 14:36
Use raw disk/partition as VirtualBox disk image
# verify your disk layout
lsblk -o NAME,FSTYPE,UUID
# NAME FSTYPE UUID
# sda
# ├─sda1 ntfs ECEAA4D4EAA49BF8 <- reserve partition
# ├─sda2 ntfs 9CD2C43CD2C41C80 <- windows
# ├─sda3
# ├─sda5 ext4 5f9e05c1-ace9-45ee-a884-ed1df68bdc3e <- /boot partition
# ├─sda6 ext4 bc1a75df-3625-4c1f-b53a-8ecc725f0d23
# └─sda7 btrfs d305a656-442f-4579-96cf-dadc964c0be2
@ljjjustin
ljjjustin / socat-tcp-to-unix-socket.sh
Last active April 4, 2024 15:00
socat-unix-socket-to-tcp.sh
#!/bin/bash
if [ $# -ne 3 ]; then
echo "usage: $0 <unix socket file> <host> <listen port>"
exit
fi
SOCK=$1
HOST=$2
PORT=$3
@glennswest
glennswest / setup-ip.yml
Created April 7, 2017 04:57
Ansible automatically create /etc/hosts file for all host - to give nice short names using dnsmasq
---
- hosts: all
tasks: []
- hosts: all
gather_facts: True
tasks:
- name: check connection
ping:
- name: setup
setup:
@harv
harv / glibc-2.17_centos6.sh
Last active July 3, 2024 09:07
update glibc to 2.17 for CentOS 6
#! /bin/sh
# update glibc to 2.17 for CentOS 6
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \