Skip to content

Instantly share code, notes, and snippets.

View jxm262's full-sized avatar
🏠
Working from home

Justin Maat jxm262

🏠
Working from home
  • Columbus, OH
View GitHub Profile
@jxm262
jxm262 / deploy-mern.md
Created March 27, 2021 17:50 — forked from rmiyazaki6499/deploy-mern.md
Deploying a Production ready React-Express app on AWS EC2 with CI/CD

Deploying a Production ready React-Express app on AWS

In this tutorial, I will be going over to how to deploy a Javascript app from start to finish using AWS and EC2. Recently, my partner Tu and I launched our app AlgoAcademy (a resource for reviewing algorithms and data structures) and we wanted to share with other developers some of the lessons we learned along the way.

Following this tutorial, you will have an application that has:

  • A React frontend, Express backend
  • An AWS EC2 server configured to host your application
  • SSL-certification with Certbot
  • A custom domain name
@jxm262
jxm262 / data.csv
Created July 7, 2020 18:47
TT VWAP in Python
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Date Open High Low Close Volume
2020-05-06 18:15:00-04:00 2832 2838.5 2832 2838 3750
2020-05-06 18:30:00-04:00 2838 2838.5 2826 2827.75 6864
2020-05-06 18:45:00-04:00 2827.75 2830.5 2827 2829.5 2937
2020-05-06 19:00:00-04:00 2829.5 2830.5 2823 2826.5 4619
2020-05-06 19:15:00-04:00 2826.75 2829.5 2825.25 2827.75 3610
2020-05-06 19:30:00-04:00 2827.75 2829.5 2825.5 2826.75 2460
2020-05-06 19:45:00-04:00 2826.75 2830.75 2826.25 2830.5 2531
2020-05-06 20:00:00-04:00 2830.5 2833.5 2830.25 2833.5 2361
@jxm262
jxm262 / data.csv
Last active June 25, 2023 07:44
TradingView VWAP-Stdev-Bands-v2-Mod-UPDATE in Python
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
Date Open High Low Close Volume
2020-05-06 18:15:00-04:00 2832 2838.5 2832 2838 3750
2020-05-06 18:30:00-04:00 2838 2838.5 2826 2827.75 6864
2020-05-06 18:45:00-04:00 2827.75 2830.5 2827 2829.5 2937
2020-05-06 19:00:00-04:00 2829.5 2830.5 2823 2826.5 4619
2020-05-06 19:15:00-04:00 2826.75 2829.5 2825.25 2827.75 3610
2020-05-06 19:30:00-04:00 2827.75 2829.5 2825.5 2826.75 2460
2020-05-06 19:45:00-04:00 2826.75 2830.75 2826.25 2830.5 2531
2020-05-06 20:00:00-04:00 2830.5 2833.5 2830.25 2833.5 2361
@jxm262
jxm262 / latency.txt
Created February 12, 2019 17:55 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@jxm262
jxm262 / sniff.txt
Created March 24, 2017 14:12 — forked from manifestinteractive/sniff.txt
A friendly formatter for curl requests to help with debugging.
\n
============= HOST: ==========\n
\n
local_ip: %{local_ip}\n
local_port: %{local_port}\n
remote_ip: %{remote_ip}\n
remote_port: %{remote_port}\n
\n
======= CONNECTION: ==========\n
\n
@jxm262
jxm262 / curl-scripts.txt
Created March 24, 2017 13:51
Format curl requests
//todo put this entire thing in bash script somewhere eventually
//http://stackoverflow.com/questions/18215389/how-do-i-measure-request-and-response-times-at-once-using-curl
//put in curl-format.txt
time_namelookup: %{time_namelookup}\n
time_connect: %{time_connect}\n
time_appconnect: %{time_appconnect}\n
time_pretransfer: %{time_pretransfer}\n
time_redirect: %{time_redirect}\n
@jxm262
jxm262 / generators.test.js
Last active January 20, 2017 20:18
js generators better explained
import "babel-polyfill";
import chai from 'chai'
chai.should()
function* justin() {
/**
* CALL # 1
/**
* Shim up the window.Element prototype
* Partially inspired here - http://stackoverflow.com/questions/6209161/extract-the-current-dom-and-print-it-as-a-string-with-styles-intact
*/
export default (function () {
const canUseDOM = !!(
(typeof window !== 'undefined' &&
window.document && window.document.createElement)
)
LTM-JMaat:scala-js-phantomjs justin.maat$ sbt test
[info] Loading project definition from /Users/justin.maat/IdeaProjects/scala-js-phantomjs/project
[info] Set current project to Example (in build file:/Users/justin.maat/IdeaProjects/scala-js-phantomjs/)
[info] 1/2 example.ScalaJSExampleTest.ScalaJSExample Success
[info] 2/2 example.ScalaJSExampleTest Success
java.util.concurrent.TimeoutException: Futures timed out after [4835928990 nanoseconds]
at scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219)
at scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223)
at scala.concurrent.Await$$anonfun$result$1.apply(package.scala:107)
at scala.concurrent.BlockContext$DefaultBlockContext$.blockOn(BlockContext.scala:53)
var mySubmitFunc = function(error, state){
if (!error) {
if (state === "signIn") {
console.log('signed in...');
// Successfully logged in
// ...
}
if (state === "signUp") {
console.log('signed up...');
// Successfully registered