View shell-aliases.sh
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' |
View serverless-github-action-deployment.yml
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: |
View cloudSettings
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"} |
View scraping-with-cheerio.js
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; | |
}; |
View addItemAPIGateway.js
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; } ) |
View addDataDynamoDB.js
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, |
View fetchDataDynamoDBdata.js
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); |
View fetchAPIGateway.js
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; } ) |