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
/* | |
This problem was asked by Apple. | |
A fixed point in an array is an element whose value is equal to its index. Given a sorted array of distinct elements, return a fixed point, if one exists. Otherwise, return False. | |
For example, given [-6, 0, 2, 40], you should return 2. Given [1, 5, 7, 8], you should return False. | |
check these for better implementation | |
https://rosettacode.org/wiki/Binary_search#JavaScript |
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
#!/bin/bash | |
# Delete all containers | |
docker rm $(docker ps -a -q) | |
# Delete all images | |
docker rmi $(docker images -q) |
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
const AWS = require('aws-sdk'); | |
AWS.config.loadFromPath('./config.json'); | |
const s3 = new AWS.S3(); | |
const uuidV4 = require('uuid'); | |
const request = require('request'); | |
const s3Bucket = new AWS.S3( { params: { Bucket: 'samus-original-bucket' } } ) | |
request.get({ | |
method: 'GET', | |
url: 'http://lorempixel.com/400/200/', |