Skip to content

Instantly share code, notes, and snippets.

View devguy201-9's full-sized avatar
:octocat:

Trần Gia Thuân devguy201-9

:octocat:
View GitHub Profile
@devguy201-9
devguy201-9 / add-timestamps.sql
Last active May 1, 2022 13:39
SQL Server - add createdAt and updatedAt columns, automatically updates
// Auto update column created_at
create trigger trg_myTable_update on myTable for update as
begin
update myTable
set updatedAt = CURRENT_TIMESTAMP
end
ALTER TABLE myTable
@devguy201-9
devguy201-9 / gist:8a5ee228aea651f147533e637f538cd3
Last active May 1, 2022 13:16
function js replace all character special in text
function replaceTextSpecial(text){return text.replace(/&/g, "&amp;").replace(/>/g, "&gt;").replace(/</g, "&lt;").replace(/"/g, "&quot;");}
{"version":1,"resource":"file:///c%3A/Users/Admin/Downloads/Compressed/Microsoft.PowerApps/apps/13768819799650473801/13768819799650473801.json","entries":[{"id":"euj9.json","timestamp":1688662077937},{"id":"yYlm.json","timestamp":1688662263499}]}
<!-- json -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.9.6</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>