This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function fetchTodoList(){ | |
var request = fetch('API-URL',{ | |
method: 'GET', | |
headers:{ | |
'Content-Type': 'application/json', | |
'x-api-key': 'API-KEY' | |
} | |
}) | |
.then(response => response.json()) | |
.then((data) => { return data; } ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var AWS = require('aws-sdk'), | |
myDocumentClient = new AWS.DynamoDB.DocumentClient(); | |
exports.todoFetchItems = function(event, context, callback) { | |
var params ={ | |
TableName: 'TABLE_NAME' | |
}; | |
myDocumentClient.scan(params, function(err, data){ | |
if(err){ | |
callback(err,null); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var uid = require('uuid'); | |
var AWS = require('aws-sdk'), | |
myDocumentClient = new AWS.DynamoDB.DocumentClient(); | |
exports.todoGetItem = function(event, context, callback) { | |
var params ={ | |
TableName: 'TABLE_NAME', | |
Item: { | |
'id' : uid.v1(), | |
'desc' : event.desc, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function addTodo(item){ | |
var request = fetch(`API-URL?desc=${item}`,{ | |
method: 'POST', | |
headers:{ | |
'Content-Type': 'application/json', | |
'x-api-key': 'API-KEY' | |
} | |
}) | |
.then(response => response.json()) | |
.then((data) => { return data; } ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require("axios"); | |
const cheerio = require("cheerio"); | |
const scrape = async url => { | |
const { data } = await axios.get(url).catch(err => console.log(err)); | |
const $ = cheerio.load(data); | |
const result = $(".skill-col").text(); | |
return result; | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"lastUpload":"2020-06-30T07:44:22.760Z","extensionVersion":"v3.4.3"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Serverless Deployement Example | |
# Triggers the action everty time there is a code push to the master branch | |
on: | |
push: | |
branches: | |
- master | |
# Specify what jobs to run | |
jobs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# custom aliases -kVn | |
alias cra="npx create-react-app" | |
alias cna="npx create-next-app" | |
# NPM | |
alias ni='npm install --save' | |
alias nid='npm install --save-dev' | |
alias ns='npm start' | |
alias nt='npm run test' | |
alias nd='npm run dev' |