Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html |
// SVG2PNG | |
// By Cees Timmerman, 2024-04-05. | |
// Paste into console and adjust indices as needed. | |
let im = document.getElementsByTagName('img') | |
let fname = location.href | |
if (im.length < 1) { | |
let svg = document.getElementsByTagName('svg')[0] | |
let bb = svg.getBBox() | |
im = new Image(bb.width, bb.height) | |
im.src = 'data:image/svg+xml;charset=utf-8;base64,' + btoa(document.getElementsByTagName('svg')[0].outerHTML) |
Create a cluster on GKE:
gcloud container clusters create backend --num-nodes=2 --machine-type n1-standard-4
Get credentials:
gcloud container clusters get-credentials backend
Build the docker image:
package sample.eventdriven.scala | |
import akka.actor.{Actor, ActorRef, ActorSystem, Inbox, Props} | |
import akka.persistence.PersistentActor | |
import scala.concurrent.ExecutionContext.Implicits._ | |
import scala.concurrent.duration._ | |
// =============================================================== | |
// Demo of an Event-driven Architecture in Akka and Scala. |
There's the pervarsive notion that all JS is created equal and that there's only minor and easily detectable differences between the various file formats used to author JavaScript. This is correct, from a certain point of view.
For many people writing JavaScript that gets passed into build tools,
browser = request.user_agent.browser | |
version = request.user_agent.version and int(request.user_agent.version.split('.')[0]) | |
platform = request.user_agent.platform | |
uas = request.user_agent.string | |
if browser and version: | |
if (browser == 'msie' and version < 9) \ | |
or (browser == 'firefox' and version < 4) \ | |
or (platform == 'android' and browser == 'safari' and version < 534) \ | |
or (platform == 'iphone' and browser == 'safari' and version < 7000) \ |
Access to Ameritrade API
notes that may be helpful for node.js devs
What I've gathered is authorization tokens must be earned first. Authorization tokens are good for three months, once you are setup, you will get two tokens which come as long strings, An access_token and a refresh_token. Access tokens are only valid for 30 minutes so you will need to code to refresh the session using the refresh token frequently. When you refresh, you are given a new access token and that is what you use to "login" or pull from the api for the next period. But in order to get the tokens, you will be required to go through some processes to get a valid token that applies to your app. The following text kind of steers you in that direction...
Making an app
On the api site you will need to make an app, where you pick some random name by using some random numbers. It should be automatically generated but it isnt. For this field item, I simply went to https://www.uuidgenerator.net/ and just grabbed the firs