Thanks to visit codestin.com
Credit goes to gist.github.com

Skip to content

Instantly share code, notes, and snippets.

View haihd's full-sized avatar
🔥
just build it

Hai Ha Dai (Dustin) haihd

🔥
just build it
View GitHub Profile
@haihd
haihd / style-gitlab.script
Created January 29, 2024 05:14
Style header for gitlab site
// ==UserScript==
// @name Style header for gitlab site
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match http://gitlab.tsdv.com.vn/*
// @require https://code.jquery.com/jquery-3.6.0.min.js
// @icon https://www.google.com/s2/favicons?sz=64&domain=toshiba.co.jp
// @grant none

Conventional Commit Messages

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

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

Commit Formats

Default

@haihd
haihd / showModal.html
Last active December 16, 2021 04:14
A native alternative modal for showModalDialog() in IE
<!doctype html>
<html>
<head>
<script type="text/javascript">
document.addEventListener("DOMContentLoaded", function() {
var dialog = document.getElementById('myDialog');
document.getElementById('show').onclick = function() {
dialog.showModal();
if(dialog.open) {
console.log('Dialog open');
1. Select
List<Integer> listId = em.createNativeQuery("select r.id from some_table r where r.id = :id")
.setParameter("id", someId).getResultList();
List<Object[]> listResult = em.createNativeQuery("select r.id, r.field_1 from some_table r where r.id = :id")
.setParameter("id", someId).getResultList();
for (Object[] r : listResult) {
// do something
Integer id = (Integer) r[0];
String field1Value = (String) r[1];