Skip to content

Instantly share code, notes, and snippets.

View tw-Frey's full-sized avatar

Frey tw-Frey

  • Taipei, Taiwan
View GitHub Profile
@tw-Frey
tw-Frey / AES256.java
Last active February 6, 2020 20:43
(use PBEKeySpec) AES256 Password Encryption/Decryption Java
package com.wardana.sukma;
import java.security.SecureRandom;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.IvParameterSpec;
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
private static final String TAG = "${NAME}";
}
Branch Release type Version format
feature alpha #major.#minor.#revision-a#build#feature
develop beta #major.#minor.#revision-b#build
release release candidate #major.#minor.#revision-r#build
hotfix release candidate #major.#minor.#revision-r#build
master stable #major.#minor.#revision
Task Branch CI build number NuGet package version
Implement feature #1 feature-1 1 1.2.0-a1feature1
Implement feature #2 feature-2 2 1.2.0-a2feature2
Implement feature #1 feature-1 3 1.2.0-a3feature1
Complete feature #1 develop 4 1.2.0-b4
Complete feature #2 develop 5 1.2.0-b5
Stabilize release release-1.2.0 6 1.2.0-r6
Release to production master 7 1.2.0
Fix production issue hotfix-1.2.1 8 1.2.1-r8
Task Branch Semantic version NuGet version
Implement feature #1 feature/a-refactor-value-naming 2.3.0-a-refactor-value-naming.1 2.3.0-a-refactor-value0001
Implement feature #2 feature/a-update-documentation 2.3.0-a-update-documentation.1 2.3.0-a-update-documen0001
Implement feature #1 feature/a-refactor-value-naming 2.3.0-a-refactor-value-naming.2 2.3.0-a-refactor-value0002
Complete feature #1 develop 2.3.0-b.3 2.3.0-b0003
Complete feature #2 develop 2.3.0-b.7 2.3.0-b0007
Stabilize release release-2.3.0 2.3.0-rc.0 2.3.0-rc0000
Release to production master 2.3.0 2.3.0
Fix production issue hotfix-2.3.1 2.3.1-rc.1 2.3.1-rc0001
@tw-Frey
tw-Frey / Search my gists.md
Created August 4, 2021 02:09 — forked from santisbon/Search my gists.md
How to search gists

Enter this in the search box along with your search terms:

Get all gists from the user santisbon.
user:santisbon

Find all gists with a .yml extension.
extension:yml

Find all gists with HTML files.
language:html

@tw-Frey
tw-Frey / log4j_rce_detection.md
Created December 14, 2021 04:25 — forked from Neo23x0/log4j_rce_detection.md
Log4j RCE CVE-2021-44228 Exploitation Detection

log4j RCE Exploitation Detection

You can use these commands and rules to search for exploitation attempts against log4j RCE vulnerability CVE-2021-44228

Grep / Zgrep

This command searches for exploitation attempts in uncompressed files in folder /var/log and all sub folders

sudo egrep -I -i -r '\$(\{|%7B)jndi:(ldap[s]?|rmi|dns|nis|iiop|corba|nds|http):/[^\n]+' /var/log
@tw-Frey
tw-Frey / gist:5544def03471c1f761b51e710289e6e7
Created January 20, 2022 10:40 — forked from kaochenlong/gist:1889703
台灣公司統一編號判斷規則
# encoding: utf-8
def company_serial_no_checker(serial)
# 共八位,全部為數字型態
at_least_8_digits = /^\d{8}$/
return false unless at_least_8_digits.match(serial)
# 各數字分別乘以 1,2,1,2,1,2,4,1
# 例:統一編號為 53212539
@tw-Frey
tw-Frey / InputType_for_EditText.md
Last active February 10, 2022 21:59 — forked from lopspower/README.md
All InputType for EditText

All InputType for EditText

Twitter

Constant Description
none There is no content type. The text is not editable.
@tw-Frey
tw-Frey / MainActivity.kt
Created April 1, 2022 12:56 — forked from pich4ya/MainActivity.kt
Android: Preventing Sensitive Information From Appearing In Background Screenshot (Recent App)
/*
@author longcat (Pichaya Morimoto)
This code snippet can be used to resolve BOT (Bank Of Thailand) mobile security requirement "insecure background"
without hurting user experience in mobile app.
Briefly, when the app is pushed into background mode (user presses the Home button)
Android phone will create screenshot of the current Activity for displaying it in recent apps menu
The recent's app screenshots will be stored at: