Skip to content

Instantly share code, notes, and snippets.

View vanrysss's full-sized avatar

Sam Van Ryssegem vanrysss

  • Mirador
  • Portland, OR
View GitHub Profile
@vanrysss
vanrysss / terraform.tf
Created October 30, 2019 00:19
ecs nlb
## NLB FOR FRONTEND
resource "aws_lb" "cistern-frontend" {
name = "${local.name_prefix}-nlb"
internal = true
load_balancer_type = "network"
subnets = flatten([module.vpc.public_subnets])
enable_cross_zone_load_balancing = true
tags = {
Environment = "${var.environment}"
#!/bin/bash
for line in $(aws s3api list-buckets --query 'Buckets[?starts_with(Name, `prd-`) == `true` && contains(Name, `dead-letter`) == `true`].Name' | jq '.[]' -r)
do
echo "$line"
aws s3 ls $line --recursive --summarize | grep "Total Objects:"
done
--recursive --summarize | grep "Total Objects:"
(ns feedback-service.core
(:require [clojure.data.json :as json]
[clojure.edn :as edn]
[org.httpkit.server :refer [run-server]]
[org.httpkit.client :as http]
[ring.middleware.params :as params]
[ring.middleware.keyword-params :as keyword-params]
[ring.middleware.nested-params :as nested-params]
[base64-clj.core :as base64]
[compojure.api.sweet :refer :all]
/*
* This is nothing fancy. I figured that the inside trader would have a high cash
* position, almost no inventory, and a low number of orders compared to their net
* asset value. I canceled a ton of orders (enough to shake out the 100 bots operating)
* and then kept internal state of what I was interested in using a map. I sub'd to
* each account's websocket feed and let the data accumulate. From there I eyeballed
* it in my terminal.
*/
package main
var express = require('express'),
app = express(),
http = require('http'),
server = http.createServer(app),
Twit = require('twit'),
io = require('socket.io').listen(server);
var _ = require('underscore');
//server.listen(process.env.PORT || 8000);
server.listen(8000);
var stream = Tw.stream('statuses/filter', {
locations: portland,
language: 'en'
});
var fn = rateLimit(1, 5000, function(msg, username) {
console.log("emitting!");
io.emit('stream', msg, username);
});
io.on('connection', function(socket) {
console.log('new connection');
<apex:page controller="IntegratedOrdersReportController" docType="html-5.0">
<apex:pageBlock title="Integrated Orders Report">
<div align="right">
<apex:outputLink value="{!$Page.IntegratedOrdersExcelExport}" >Export Details
<apex:param name="startDate"
value="{!startDate}"
assignTo="{!startDate}"/>
<apex:param name="endDate"
public with sharing class IntegratedOrdersReportController{
private static List<IntegratedReports_Order__c> intgOrders;
private static List<Order_Summary__c> realOrders;
public static List <MergedOrder> mergedOrders {get; set;}
public date endDate {get; set;}
public date startDate {get; set;}
//consturctor