Skip to content

Instantly share code, notes, and snippets.

View n05la3's full-sized avatar
🏠
Working from home

Calson Chiatiah n05la3

🏠
Working from home
View GitHub Profile
@n05la3
n05la3 / email.service.ts
Created March 22, 2023 06:22
Email Templating With AWS SDK and EJS in a Node backend
import { join } from 'path';
import { SendEmailCommand, SESClient } from '@aws-sdk/client-ses';
import { renderFile } from 'ejs';
interface Template {
name: string;
data?: Record<string, any>
}
interface EmailOption {
@n05la3
n05la3 / C.sublime-build
Created February 15, 2018 07:35
compile c code from sublime text, add the C.sublime-build to .config/sublime-text-3/Packages/User/
{
"cmd": ["gcc", "$file", "-o", "${file_path}/${file_base_name}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.c++, source.cxx, source.cpp",
"variants":
[
{
"name": "Run",
"shell": true,
@n05la3
n05la3 / reqfield.html
Created November 23, 2017 18:06
Notify when required form field is skipped
<script>
$('document').ready(
function(){
$('input').on('click focus',
function(){
//sample form id in order of appearance
var fillable = ['fn', 'ln', 'age', 'email', 'pass', 'pass_ok'];
$('input').css('border', '');
for(var i = 0; i<=fillable.indexOf(this.id); ++i){
z = $('#'+fillable[i]);