Skip to content

Instantly share code, notes, and snippets.

@phanviet
phanviet / init.el
Last active December 26, 2022 05:01
(tool-bar-mode -1)
(show-paren-mode 1)
(setq auto-save-default nil)
(setq make-backup-files nil)
(setq ring-bell-function 'ignore)
(setq-default indent-tabs-mode nil)
(setq tab-width 2)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(setq require-final-newline t)
(set-frame-font "Anonymous Pro 16" nil t)
[general]
ui=TTYUI
accounts = Gmail
autorefresh = 5
[Account Gmail]
localrepository = Gmail-Local
remoterepository = Gmail-Remote
[Repository Gmail-Local]
@phanviet
phanviet / cloudSettings
Last active September 13, 2018 01:49
vscode config
{"lastUpload":"2018-09-13T01:49:40.076Z","extensionVersion":"v3.1.2"}
AWSTemplateFormatVersion: 2010-09-09
Description: AWS AppSync Notes API
Parameters:
APIName:
Type: String
Description: Name of the API - used to generate unique names for resources
MinLength: 3
MaxLength: 20
@phanviet
phanviet / snippets.cson
Created December 6, 2019 02:26
atom snippets
# Your snippets
#
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to
# expand the prefix into a larger code block with templated values.
#
# You can create a new snippet in this file by typing "snip" and then hitting
# tab.
#
# An example CoffeeScript snippet to expand log to console.log:
#
@phanviet
phanviet / keymap.cson
Created December 6, 2019 03:34
atom keymap
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@phanviet
phanviet / config.cson
Created December 6, 2019 15:02
atom config
"*":
"autocomplete-plus":
strictMatching: true
core:
disabledPackages: [
"linter"
]
telemetryConsent: "no"
themes: [
"atom-light-ui"
@phanviet
phanviet / keymap.cson
Created December 7, 2019 03:28
atom keymap
# Your keymap
#
# Atom keymaps work similarly to style sheets. Just as style sheets use
# selectors to apply styles to elements, Atom keymaps use selectors to associate
# keystrokes with events in specific contexts. Unlike style sheets however,
# each selector can only be declared once.
#
# You can create a new keybinding in this file by typing "key" and then hitting
# tab.
#
@phanviet
phanviet / Mutation.createVariant.req.vtl
Created December 8, 2019 14:52
VTL create resource example
## [Start] Determine request authentication mode **
#if( $util.isNullOrEmpty($authMode) && !$util.isNull($ctx.identity) && !$util.isNull($ctx.identity.sub) && !$util.isNull($ctx.identity.issuer) && !$util.isNull($ctx.identity.username) && !$util.isNull($ctx.identity.claims) && !$util.isNull($ctx.identity.sourceIp) && !$util.isNull($ctx.identity.defaultAuthStrategy) )
#set( $authMode = "userPools" )
#end
## [End] Determine request authentication mode **
## [Start] Check authMode and execute owner/group checks **
#if( $authMode == "userPools" )
## [Start] Static Group Authorization Checks **
#set($isStaticGroupAuthorized = $util.defaultIfNull(
$isStaticGroupAuthorized, false))
@phanviet
phanviet / Mutation.updateVariant.req.vtl
Created December 8, 2019 14:53
VTL update resource example
## [Start] Determine request authentication mode **
#if( $util.isNullOrEmpty($authMode) && !$util.isNull($ctx.identity) && !$util.isNull($ctx.identity.sub) && !$util.isNull($ctx.identity.issuer) && !$util.isNull($ctx.identity.username) && !$util.isNull($ctx.identity.claims) && !$util.isNull($ctx.identity.sourceIp) && !$util.isNull($ctx.identity.defaultAuthStrategy) )
#set( $authMode = "userPools" )
#end
## [End] Determine request authentication mode **
## [Start] Check authMode and execute owner/group checks **
#if( $authMode == "userPools" )
## [Start] Static Group Authorization Checks **
#set($isStaticGroupAuthorized = $util.defaultIfNull(
$isStaticGroupAuthorized, false))