- Final closure on my ally account, realized gain: 6k. Basis was 10k started over 10 years ago to practice a little bit of private investment at the end of high school, got 60% overall.
- The ach from ally is on hold until tomorrow.
- Urthbox charged me another $90 for another 3 month subscription of snacks delivered to Eric's house. I never wanted this, it was a one-time gift. Their fine print is bullshit and I emailed their support team.
- cprofile is a good profiler for python. @profile is a built-in decorator for memory profiling.
- numpy.ndarray can only hold one datatype, so it's mucccccch more efficient than the generic python list (which has to allocate for flexible data types in every element).
- index.js are kinda like __init__.py files in python, spread through the project dirs to organize code and import/export availability within subpackages.
- In js, you can specify one and only one export as "default", which means that imports can call it namelessly. Otherwise, you name your exports and import them by name.
- form-control is bootstrap. my-3 is a spacing example for bootstrap, which sets margin top and bottom (y-axis) to 3.
- Dayum. Finasteride, propecia, antibaldness drug can can impotence and anxiety: https://elemental.medium.com/my-life-has-been-ruined-by-an-anti-baldness-propecia-finasteride-side-effects-ed8b2fcd1e90.
- Police have had facial recognition database for a while. They can identify from mug shots, videos of crimes, etc. https://onezero.medium.com/california-police-are-sharing-facial-recognition-databases-to-id-suspects-3317726d31ad.
- While most are scared of technology like this, I'm a huge proponent. The more data, the better, even if private. This is an accountability problem, not a morality problem. 23andme genetic data, facial data, crime data, advertising data - take it all. I don't have anything to hide, and data connections enable so many useful functionalities.
- MERN:
- High level index.js which does the ReactDOM.render().
- That imports components from other clean files, like a jsx that defines a Switch and a Route inside of a class or hook and exports it.
- AmEx anticipates vacations based on travel purchases, inferring that you'll be away during certain dates and allowing transactions while there. Pretty cool, and not that hard.
- Placed fresh order.
- Morgan is the js library for request logging with node express apps.
- Axios is a library (wrapped around ajax using xml http requests) that allows you to make promise-based requests from the frontend or backend.
- Smoked chicken breast for softball. Tenderization is so important. I used a valentina bottle to pound them flat lol. Bought an actual tenderizer online. Going to try the 48 blade puncture tenderizer instead of the mallet variety.
- NFL is back!! Preaseason week 1 tonight, TNF, broncos vs falcons.
- Trichinella dies at 137F. Salmonella dies at a higher temp, and it takes a bit longer. Getting it above 160 is fine, 165 is even safer.
Thursday, August 1, 2019
- Robinhood: Bought beyond from my interdigital sales. Also sold seagate today.
- Ally: Cleared final holdings, microsoft and tesla. I'll reup msft in robinhood.
- Paid rent while the money was moving around.
- It might be worth getting a stackoverflow account and starting to provide answers. The clout is a good bonus. Even better benefits: paying it forward + open source mentality.
- Brake fade is due to heat. Over long applications (braking all the way from like 200mph, or going downhill) the braking power decreases. Gas builds up.
- A strong thought I had today, and have had before: Convenience is the enemy of healthy eating, not flavor. It's so much easier to grab a granola bar or cereal, a sandwich or snacks. Healthy foods are usually ingredients which require some sort of effort to transform from their raw state into a usual meal. This is what makes good nutrition difficult. We have enough distraction and exhaustion throughout the rest of our days; to add more in a neverending task like meal prep is hard.
- To fight against this, I do as much prep beforehand.
- My morning meals have always been a shake. Instead of getting out the teaspoons and measuring 10 different powders every morning, I do it in a batch of 10 jars. Then breakfast is just pouring a jar into water in a bottle.
- I have a veggie smoothie every day. Instead of cutting and apportioning all the kale and tyogurt and carrots and all every time, I batch it all at once. Then a smoothie is just grabbing 5 items from the fridge, rinsing with water, then throwing in a blender and drinking.
- Same goes for carrots/beets for juicing.
- Same goes for bell peppers for hummus/snacks.
- Abstract route logic into other functions, then have your route definitions (decorations) be as simple as possible. This is called route middleware: http://expressjs.com/2x/guide.html#route-middleware. The middleware can be responsible for looking up a user in the database, requiring that someone is an admin, or much more. Then once the middleware accomplishes what it wants, pass to next().
- Read through the express 4 api docs.
- app.use(path, callback)
- If nothing is passed to the first argument for path, it defaults to the home route /, so applies to everything.
- This is exactly where you put your middleware logic, and then mount it.
- Pretty similar to flask all around.
- Read through the mongoose 5 api docs, the mongo shim for node.
- All around similar to sqlalchemy. Define the schema, connect to the db, validate against models, etc.
- Worked with briley for a minute on the hydra angular frontend.
- npm:
- sudo chown -R $USER ~/.npm again.
- -D is the same as --save-dev
- Webpack:
- Pip.
- webpack.config.js provides mores configuration for the package, extending package.json. Both are similar to setup.py. The webpack config allows specification of entry points, resolvers, loaders, much more.
- Can also be used to build your client app or start development (webpack-dev-server).
- Defines the main template to load, the js to run on it (react render, etc).
- Simple MERN blog app:
- Created the client react app, refreshed on the express/mongo backend and server app. Compiled with webpack dev, almost done.
- Webpack config has the entry point defined, which is /src/index.js. This is like main. It loads react and all the components + stylesheets.
Subscribe to:
Comments (Atom)