Local AWS lambda service call via sam / aws sam cli, you can also attach debugger to VSCode via configuration settings.json
$ sam local invoke --profile=dev MyServiceName1 -e events/events-MyServiceName1.json -n env/env-MyServiceName1.json
version: '3.1' | |
services: | |
redis: | |
image: redis:5-alpine | |
platform: linux/amd64 | |
restart: unless-stopped | |
container_name: redis | |
ports: | |
- '6379:6379' |
SELECT @@sql_mode; | |
SET GLOBAL sql_mode = 'NO_ENGINE_SUBSTITUTION'; | |
SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION'; | |
-- other commands | |
SELECT @@sql_mode; | |
SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY')); | |
SET GLOBAL sql_mode = 'ONLY_FULL_GROUP_BY'; |
Local AWS lambda service call via sam / aws sam cli, you can also attach debugger to VSCode via configuration settings.json
$ sam local invoke --profile=dev MyServiceName1 -e events/events-MyServiceName1.json -n env/env-MyServiceName1.json
const moment = require('moment') | |
/** | |
* Get time for next round off 10 minutes in epoch form. | |
* @returns { number } epoch time | |
* | |
* if time is 17:23:32 => 17:30:00 | |
* if time is 17:53:32 => 18:00:00 | |
* if time is 23 Oct, 2023 23:53:32 => 24 Oct, 2023 00:00:00 | |
*/ | |
function getNextTimeClickFor10Minutes() { |
SHOW VARIABLES LIKE 'sql_mode'; | |
SET global sql_mode = 'NO_ENGINE_SUBSTITUTION'; |
'use strict' | |
const httpProxy = require('http-proxy'); | |
const Logger = use('Logger'); | |
class ProxyController { | |
/** | |
* Proxy any request to the targeted PROXY_HOST | |
* |
Thank you everybody, Your comments makes it better
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
## AWS ## | |
# All AWS C9 envments | |
https://eu-central-1.console.aws.amazon.com/cloud9/home?region=us-east-1 | |
# Instance management | |
https://console.aws.amazon.com/ec2/home?region=eu-central-1#Instances:sort=instanceId | |
# Create AWS C9 environment | |
https://eu-central-1.console.aws.amazon.com/cloud9/home/create |
# nil? can be used on any Ruby object. It returns true only if the object is nil. | |
nil.nil? # => true | |
[].nil? # => false | |
{}.nil? # => false | |
"".nil? # => false | |
" ".nil? # => false | |
true.nil? # => false | |
# empty? can be used on some Ruby objects including Arrays, Hashes and Strings. It returns true only if the object's length is zero. | |
nil.empty? # NoMethodError: undefined method `empty?' for nil:NilClass |
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/session" | |
"github.com/aws/aws-sdk-go/service/athena" | |
) |