This file contains hidden or 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
| aws bedrock list-foundation-models --region us-east-1 --query 'modelSummaries[*].[modelId]' --output json | jq -r ' | |
| flatten | | |
| group_by(split(".")[0]) | | |
| map({ | |
| (.[0] | split(".")[0]): map(split(".")[1]) | |
| }) | | |
| add' |
This file contains hidden or 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
| // basic-http-auth.js | |
| function btoa(input) { | |
| var b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; | |
| input = String(input); | |
| var bitmap, a, b, c, | |
| result = "", i = 0, | |
| rest = input.length % 3; | |
| for (; i < input.length;) { | |
| if ((a = input.charCodeAt(i++)) > 255 |
This file contains hidden or 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
| function fetchData() { | |
| let sergiosTasks = { | |
| tasks: ['study oop javascript', 'prepare for sysops exam', 'read linux book', 'write article'], | |
| getTasks() { | |
| console.log('Today I have to:') | |
| this.tasks.forEach((task, index) => { | |
| console.log(`(${index + 1}) ${task}`); | |
| }) | |
| } | |
| } |
This file contains hidden or 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
| function fetchData() { | |
| let sergiosTasks = { | |
| tasks: [ | |
| 'study oop javascript', | |
| 'prepare for sysops exam', | |
| 'read linux book', | |
| 'write article' | |
| ], | |
| getTasks() { | |
| console.log('Today I have to:') |
This file contains hidden or 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
| class Employee { | |
| constructor(name, lastName, salary) { | |
| this.name = name; | |
| this.lastName = lastName; | |
| this.salary = salary; | |
| } | |
| getSalaryInfo() { | |
| const calculateMonthlyWages = () => { | |
| return { |
This file contains hidden or 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
| class Employee { | |
| constructor(name, lastName, salary) { | |
| this.name = name; | |
| this.lastName = lastName; | |
| this.salary = salary; | |
| } | |
| getSalaryInfo() { | |
| const calculateMonthlyWages = function() { | |
| return { |
This file contains hidden or 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
| class Employee { | |
| constructor(name, lastName, salary) { | |
| this.name = name; | |
| this.lastName = lastName; | |
| this.salary = salary; | |
| } | |
| getSalaryInfo() { | |
| function calculateMonthlyWages() { | |
| return { |
This file contains hidden or 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
| class Employee { | |
| constructor(name, lastName, salary) { | |
| this.name = name; | |
| this.lastName = lastName; | |
| this.salary = salary; | |
| } | |
| getSalaryInfo() { | |
| let self = this; // use a variable in outer scope to | |
| // preserver the value of `this` |
This file contains hidden or 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
| class Employee { | |
| constructor(name, lastName, salary) { | |
| this.name = name; | |
| this.lastName = lastName; | |
| this.salary = salary; | |
| } | |
| displaySalaryInfo() { | |
| function calculateMonthlyWages() { | |
| return { |
This file contains hidden or 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
| let sergiosTasks = { | |
| tasks: ['study oop javascript', 'prepare for sysops exam', 'read linux book', 'write article'], | |
| getTasks() { | |
| console.log('Today I have to:') | |
| this.tasks.forEach((task, index) => { | |
| console.log(`(${index + 1}) ${task}`); | |
| }) | |
| } | |
| } |
NewerOlder