Skip to content

Instantly share code, notes, and snippets.

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

Sang Tran tranvansang

🏠
Working from home
View GitHub Profile
@tranvansang
tranvansang / notifySlackAWSLambda.js
Created July 28, 2020 05:11
Send slack webhook from AWS Lambda on AWS SNS notification (single script without library)
// NodeJS v12
const https = require('https')
const send = data => {
const options = {
hostname: 'hooks.slack.com',
port: 443,
path: '/services/<webhook-id>',
method: 'POST',
headers: {
/* Must be root or SUID 0 to open RAW socket */
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
@tranvansang
tranvansang / .eslintrc
Last active July 29, 2019 09:18
Configuration
{
"extends": [
"airbnb-base",
"eslint:recommended",
"plugin:react/recommended"
],
"settings": {
"import/resolver": {
"node": {
"extensions": [".js", ".jsx", ".ts", ".tsx"]
@tranvansang
tranvansang / cloudSettings
Last active October 1, 2018 01:40
vscode setting
{"lastUpload":"2018-10-01T01:40:23.538Z","extensionVersion":"v3.1.2"}
[Desktop Entry]
Type=Application
Name=WebStorm
Exec=/opt/WebStorm/bin/webstorm.sh %f
Icon=/opt/WebStorm/bin/webstorm.png
Type=Application
Comment=WebStorm best web developer IDE
Categories=Development;IDE;TextEditor;Utility
Terminal=false
StartupNotify=true