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'); | |
AWS.config.region = 'us-west-2'; | |
AWS.config.update({ | |
accessKeyId: process.env.AWS_ACCESS_KEY_ID, | |
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY | |
}); | |
var s3 = new AWS.S3({params: {Bucket: process.env.S3_BUCKET_NAME}}); |
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
<div galleryScroll class='gallery-image-container hide-gallery' [class.show-gallery]='showGallery'></div> |
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
private sortedItemsToBalancedColumns(orderedValues: any, numberOfColumns: number): any[] { | |
var numberOfValues = orderedValues.length; | |
var numberOfCompleteRows = Math.floor(numberOfValues / numberOfColumns); | |
var lengthOfExtraRow = numberOfValues % numberOfColumns; | |
var columns = new Array(numberOfColumns); | |
for (let i = 0; i < numberOfColumns; i++) { | |
if (lengthOfExtraRow > 0) { | |
columns[i] = orderedValues.splice(0, numberOfCompleteRows + 1); |
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
{ | |
"properties": { | |
"BodyType":{ | |
"type":"string", | |
"fields":{ | |
"Raw":{ | |
"type":"string", | |
"analyzer": "trim" | |
} | |
}, |
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
begin | |
for i in (select * from vehiclecache.auctionvehicles where auctiondate > sysdate and ((make = 'Chevrolet' and model = 'Cruze') or make = 'Tesla')) | |
loop | |
vehiclecache.avindexqueueservice.AddToQueue(i.id, 'U'); | |
end loop; | |
end; |
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
$@"INSERT INTO omnicounts ( | |
createduserid, | |
dealerid, | |
userid, | |
buylistitems7d, | |
buylistitems14d, | |
buylistitems30d, | |
buylist7d, | |
buylist14d, | |
buylist30d, |
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
# Change to match your CPU core count | |
workers 1 | |
# Min and Max threads per worker | |
threads 1, 6 | |
directory "/home/rails/RubyFinanceTracker" | |
app_dir = File.expand_path("../..", __FILE__) | |
shared_dir = "#{app_dir}/shared" |
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
# This file is used by Rack-based servers to start the application. | |
require_relative 'config/environment' | |
run Rails.application |
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
[Unit] | |
Description=Puma HTTP Server | |
After=network.target | |
# Uncomment for socket activation (see below) | |
# Requires=puma.socket | |
[Service] | |
# Foreground process (do not use --daemon in ExecStart or config.rb) | |
Type=simple |
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
private matchTargetPriceBucket(ruleSet: Models.IPricingTargetRuleSet, dayValue: number): number { | |
if (ruleSet === null || ruleSet.Rules.length === 0) { | |
console.error("No price buckets were provided."); | |
return null; | |
} | |
if (!dayValue || dayValue < 0) { | |
console.error("Invalid day value. Won't match any price target bucket."); | |
return null; | |
} |
OlderNewer