Skip to content

Instantly share code, notes, and snippets.

View joutvhu's full-sized avatar

Giáo Hồ joutvhu

View GitHub Profile
mvn -N wrapper:wrapper

mvn -N wrapper:wrapper -Dmaven="3.8.1"
mvn dependency:tree

mvn dependency:tree -Dincludes="[groupId]:[artifactId]:[type]:[version]" -Dexcludes="[groupId]:[artifactId]:[type]:[version]"
list disk

select disk 0

clean

convert gpt

create partition efi size=512
root = true
[*]
charset = utf-8
end_of_line = crlf
indent_size = 4
indent_style = space
insert_final_newline = true
max_line_length = 120
tab_width = 4

Updating JetBrains Runtime (JBR)

  • Start the IDE, use Help -> Find Action, type Choose Boot Java Runtime for the IDE, press Enter.
  • Select the newest version to install.
  • Click the OK button and wait until the file with JetBrains Runtime is downloaded and configured.
  • Restart the IDE and Enjoy.
@joutvhu
joutvhu / update-version.js
Last active May 6, 2022 10:00
Update APP_VERSION by package version
const fs = require('fs');
function updateVersion(file, packagePath = 'package.json') {
fs.readFile(file, 'utf8', (err, data) => {
if (err) console.error(err);
else if (data) {
const packageFile = fs.readFileSync(packagePath, 'utf8');
const packageData = JSON.parse(packageFile);
const formatted = data.replace(
  • Disable git hooks
git config core.hooksPath no-hooks
  • Re-enable git hooks
git config --unset core.hooksPath
  • Create a get-base64.js file with the content as below
const fs = require('fs');

console.log(fs.readFileSync(
	'<file path>',
	{encoding: 'base64'}
));
def commandLineOf(command, terminal = null) {
    if (System.properties['os.name'].toLowerCase().contains('windows')) {
        return ['cmd', '/c', command]
    } else if (terminal != null) {
        return ['bash', '-c', terminal]
    } else {
        return ['bash', '-c', command]
    }
}

Keybase proof

I hereby claim:

  • I am joutvhu on github.
  • I am giaoho (https://keybase.io/giaoho) on keybase.
  • I have a public key whose fingerprint is C046 587F 0F28 514D D1CA 8806 9197 3851 14CC 19D1

To claim this, I am signing this object: