Git : ignore package-lock.json or yarn.lock in diff
git diff -- ':!package-lock.json' ':!yarn.lock'
2 days ago
Intel Optane SSD Microbenchmark
When using LMDB, the LMDB engine will never be the bottleneck in your workloads. When you move onto faster storage technologies, LMDB will let you utilize the full potential of that hardware. Inferior technologies like LSM designs won't.
8 days ago
Audio/Alsamixer - Ubuntu Wiki
fixed mic hum by nudging levels down
linux  ubuntu 
14 days ago
Cross-site request forgery - Wikipedia
token is in domain-only cookie, then: a) double-submit in request body (proves JS/client was able to read domain-only cookie and put it in request body) or b) cookie-to-header (proves JS/client was able to read domain-only cookie and put it in out-of-band header.
21 days ago
How to exclude getter only properties from type in typescript - Stack Overflow
// https://github.com/Microsoft/TypeScript/issues/27024#issuecomment-421529650
type IfEquals<X, Y, A, B> =
(<T>() => T extends X ? 1 : 2) extends
(<T>() => T extends Y ? 1 : 2) ? A : B;

type WritableKeysOf<T> = {
[P in keyof T]: IfEquals<{ [Q in P]: T[P] }, { -readonly [Q in P]: T[P] }, P, never>
}[keyof T];
type WritablePart<T> = Pick<T, WritableKeysOf<T>>;
26 days ago
Overloading Global Secondary Indexes - Amazon DynamoDB
modeling entities as "entity id is hash key", "column name is sort key", so you can hack around GSI limitations and have 1 index on the "attribute 1" column.
27 days ago
TypeScript: Create a condition-based subset types – DailyJS – Medium
explanation of SubType as a general "extract keys based on a condition"
28 days ago
Javascript Classes v. Closures (2/3) – Engineering@Livestream – Medium
I will admit I do not fully grok Egorov’s very technical response, but the understanding that I do get is, basically, v8 rocks at doing classes.
4 weeks ago
Protobuffers Are Wrong :: Reasonably Polymorphic
tldr: the type system is driven from impl concerns, so doesn't compose/generify like type systems should
5 weeks ago
The Go Playground
example of returning nil, but its wrapped in an interface, so doesn't look nil
6 weeks ago
John Urschel Goes Pro – Hmm Daily
There’s no such thing as impostor syndrome in football, he tells me. “Everyone in college football thinks they’re NFL-bound,” he tells me. “If you have that personality of ‘what am I doing here?’, you’ve gotten weeded out a while ago.”
6 weeks ago
keyof to produce a runtime array · Issue #13267 · Microsoft/TypeScript
can't make a runtime value based on compile-time types, although there is a plugin to do it
7 weeks ago
Functional Core, Imperative Shell
functional/immutable data structures on the inside that are organized by the imperative shell.

imperative shell is actually untested because it has basically no conditionals.
7 weeks ago
Error Handling | Joyent
People use the term "errors" to talk about both operational and programmer errors, but they're really quite different. Operational errors are error conditions that all correct programs must deal with, and as long as they're dealt with, they don't necessarily indicate a bug or even a serious problem. "File not found" is an operational error, but it doesn't necessarily mean anything's wrong. It might just mean the program has to create the file it's looking for first.

By contrast, programmer errors are bugs. They're cases where you made a mistake, maybe by forgetting to validate user input, mistyping a variable name, or something like that.
8 weeks ago
Good Spirits: Syncing Data Statelessly — Archagon Was Here
mobile app that stores property value/lamport timestamp for syncing. gpl.
10 weeks ago
Naval on Twitter: "How to Get Rich (without getting lucky):"
You will get rich by giving society what it wants but does not yet know how to get. At scale.
11 weeks ago
Dad’s company made burgers. Mine just eats them | Aeon Essays
We call ourselves web developers, software engineers, builders, entrepreneurs, innovators. We’re celebrated, we capture a lot of wealth and attention and talent. We’ve become a vortex on a par with Wall Street for precocious college grads. But we’re not making the self-driving car. We’re not making a smarter pill bottle. Most of what we’re doing, in fact, is putting boxes on a page. Users put words and pictures into one box; we store that stuff in a database; and then out it comes into another box.
11 weeks ago
Opinion | The Bitter Regrets of a Useless Chinese Daughter - The New York Times
Before my mother’s illness, I spurned what I saw as an excess of pragmatism among Chinese people, who want to ensure that all of their efforts go toward something useful. College degrees, jobs, friendships, marriages — all these should be chosen practically. “Be wise, pick an able man. Love doesn’t feed you,” my people like to say. Looking back on my high school years, all my relatives tried to talk me, a top-ranking student, into majoring in science or finance in college. But I was stubborn enough to stay with my favorite subject, literature. Now I understand them.
12 weeks ago
Hey Reddit, I just broke the overall piston-driven land speed record! 448.757MPH : pics
I use 1.5 feet per second is roughly equal to 1 mile an hour. It’s actually 1.46666666666666666 feet per second is equal to one mile an hour.

So, from the time their front bumper is equal with yours to the time their rear bumper is passing your front is the length of their car divided by 1.5’ per second, gives you how much faster they were moving.

A Honda Accord is about 15’ in length for reference. If they pass you in less than a second, it’s at least 10 mph faster than you.
august 2018
square/javapoet: A Java API for generating .java source files.
nice joist-ish library for codegen, takes are of auto-imports, etc
august 2018
The Tyranny of Stuctureless
there is no such thing as structureless--human nature is such that there is always a hierarchy. thinking you're "structureless" just makes it a hidden and unfair game.

democracy makes it a visible and "fair" game:
- delegation of authority for specific tasks
- executors are still responsible/accountable to the wider group
- distribution of power across many people
- rotation of tasks among individuals
- allocation of tasks along rational criteria
- diffusion of information to everyone, and
- equal access to resources
august 2018
Life Beyond Distributed Transactions: An Apostate's Implementation - Document Coordination
I need to design my interactions so that both the business data and communications transact together.
august 2018
Jarrow Formulas : QH-absorb
QH-absorb® is a proprietary, enhanced-stability formula, clinically shown in humans to increase Co-Q10 levels by 215% at 100 mg per day and by 777% over baseline at 300 mg per day. (Mentioned by Attia)
august 2018
Do calories matter? - Peter Attia
Obesity is a growth disorder just like any other growth disorder.  Specifically, obesity is a disorder of excess fat accumulation.  Fat accumulation is determined not by the balance of calories consumed and expended but by the effect of specific nutrients on the hormonal regulation of fat metabolism.  Obesity is a condition where the body prioritizes the storage of fat rather than the utilization of fat.

thermodynamics viewpoint is correct, but assumes calories consumed and calories stored are independent variables. they are not.
health  keto 
august 2018
Good Sugar vs. Bad Sugar, Know the Differences | Factor75
HFCS = 50% fructose, "free and unbound", immediately available for fat storage
agave nector = 90% fructose, "low GI", but due to fructose being metabolized in liver instead of blood stream
raw honey = GI of 30, ~good; processed honey has GI of 75
maple syrup = low in free fructose, but 66% sucrose, so 33% fructose, choose darker grades, GL 8.
molasses = 50% free fructose, another 25% via sucrose
coconut palm sugar = ~40% fructose

best fruits: blueberries, strawberries, grapefruit
health  keto 
august 2018
Keto Diet Plan: The Best and Worst Low Carb Sweeteners | Ruled Me
stevia == good
allulose == good, 1.5x table sugar
Erythritol == sugar alcohol, good, secreted in urine
Xylitol == sugar alcohol, okay, toxic to dogs, possible GI discomfort
maltitol == sugar alcohol, actually high GI, high GI discomfort
sucralose == good if liquid, splenda bulk form still spikes insulin
aspartame == good according to studies, not good for higher temps
saccharin == no proven side effects, but less popular, avoid
overall: use erythritol, stevia, and liquid sucralose
health  keto 
august 2018
Deep-Frying With Peanut Oil Vs. Other Oils | LIVESTRONG.COM
Peanut oil is a healthy alternative to other types of oils. Peanut oil, like other types of vegetable oils, is low in saturated fat and is free of cholesterol and trans fat. Like olive oil, peanut oil is high in monounsaturated fat, which can reduce your risk for cardiovascular disease when eaten as a replacement for unsaturated fats.
august 2018
Periodic fasting starves cisplatin‐resistant cancers to death | The EMBO Journal
Recent research by Obrist et al (2018) shows that cisplatin‐resistant growth of lung adenocarcinoma is particularly vulnerable to periodic fasting cycles and starvation‐induced cell death, due to its dependency on glutamine, required for nucleoside biosynthesis, suggesting an opportunity for nutritional anti‐cancer interventions.
cancer  health 
august 2018
How we scaled nginx and saved the world 54 years every day
Which means that if an event handler needs to read from disk, it will block the event loop until the entire read is finished, and subsequent event handlers are delayed.
programming  nginx 
august 2018
Apache Voting Process
+0: 'I don't feel strongly about it, but I'm okay with this.'
-0: 'I won't get in the way, but I'd rather we didn't do this.'
-0.5: 'I don't like this idea, but I can't find any rational justification for my feelings.'
++1: 'Wow! I like this! Let's do it!'
-0.9: 'I really don't like this, but I'm not going to stand in the way if everyone else wants to go ahead with it.'
+0.9: 'This is a cool idea and i like it, but I don't have time/the skills necessary to help out.'
july 2018
RFC 7636 - Proof Key for Code Exchange by OAuth Public Clients
to mitigate mobile side-attack of watching auth-code come back:
1) 1st request to auth server has hash(secret)
2) 2nd request to auth server has secret, to prove, yes, i'm the process that made the 1st request.


* only give auth code to the pre-registered/trusted client uri (via URLs/app links)
* only give auth token to the process who provably made the 1st request (s2s uses pre-shared client secret, mobile uses one-time secret)
july 2018
Authenticate with a backend server  |  Google Sign-In for Android  |  Google Developers
Verify the integrity of the ID token
* The ID token is properly signed by Google.
* aud is equal to your client ID, e.g. the token was not issued to a malicious app
* iss is equal to accounts.google.com
* exp has not passed
july 2018
Understanding OAuth 2.0 and OpenID Connect — Runscope Blog
OIDC == oauth2 with a defined identity token and fixed scopes (openid, profile, email, address, and phone)

claim = name/value pair embedded in access/id tokens. JWT defines the concept, but no specific name/value pairs.
july 2018
Twitch streamers who spend years broadcasting to no one | Hacker News
Yeah. Speaking as someone who ran a rather large fansite about NIN in the 2000s (the entity now basically exists as a Twitter account), you really cannot just "grow organically" on today's internet. I like to tell people I have a marketing allergy. Self-promotion feels gross. The "if you build it, they will come" mantra from Field of Dreams is not applicable to a world where so much more content is being created than can possibly be consumed.
july 2018
Why Does Your Company Deserve More Money?
If you have 12-15 months of runway, and aren't seeing growth+retention, get very lean. You don't deserve a series A.

If you're selling preferred shares: can you convince *yourself* and *your spouse* that this business is worth *the next 10 years of your life*?

1. Is the product delighting users/paying customers, such that they'll talk to each other? If your revenue is ads, your customers are advertisers.
2. Do you have enough ownership to give you choices down the road.
july 2018
Designing GraphQL Mutations – Apollo GraphQL
* Specific mutations that correspond to semantic user actions are more powerful than general mutations
* all mutations have FooInput and FooPayload
* use nesting within FooInput and FooPayload
july 2018
Meet Bandaid, the Dropbox service proxy | Dropbox Tech Blog
Request queueing implemented inside the proxy allows for better management of overloaded backends. Bandaid always processes requests in Last In, First Out (LIFO) order. When the system is not overloaded, the queue will be empty (or almost empty). Thus there’s no real difference between popping requests from the front of the queue or the back of the queue. Where LIFO processing reduces overhead is when the system is overloaded. By processing the newest requests first—since the oldest requests are likely to time out soon—we avoid spending CPU cycles on expiring requests.
programming  http 
july 2018
Thrift + Graphs = Strong, flexible schemas on Hadoop - thoughts from the red planet - thoughts from the red planet
enum Gender {
MALE = 1, FEMALE = 2

union PersonPropertyValue {
1: string name;
2: i16 age;
3: Gender gender;

struct PersonProperty {
1: PersonID id;
2: PersonPropertyValue property;
july 2018
(17) Rodrigo Muñoz - GraphQL Live: Reactive Queries at Facebook - YouTube
* subscriptions are great, but assume you know what business event you want to listen for
* queries have may computed field that don't directly expose what upstream fields they're based on.
* if you have N subscriptions-on-mutations, you can add the field (potentially via a fragment) to each one
* and note, not every subscription that touches that fragment, only those subscriptions for business events that explicitly change the description, as otherwise you're over-fetching.
* all of these entail "a developer finds where that changes description"

* subscriptions & live queries are isomorphic--subscriptions are business change events, live queries are "state is now Y"


* over-observing: if query to backend ends up being a "select *"
* masked dependencies: if query response uses a cache hit, you miss what the underlying data dependency would have been for a cache miss
* partial reactivity: some data sources are react, some are not, and developers can't tell which will/will not be live.
july 2018
(17) Tom Ashworth - GraphQL at Twitter - YouTube
* twitter uses sangria
* assign query cost based on levels of nesting
* use persisted query ids to prevent malicious calls
* subscription is client listening for "event", map it with a "query", and receive the "payload"
* after an event, they're just re-executing query against the real api
* strato is twitter's existing rejoiner/federated database
july 2018
(17) Rob Zhu - GraphQL Subscriptions: Full Stack - YouTube
* subscription takes a source stream and maps it to a response stream
* server has to divine what source stream the query was for
* streaming transport == websockets (small) -> rsocket/MQTT (distributed)
* connection handling == in-process (small) -> gateway/proxy (distributed)
* source stream == in-process (small) -> redis, kafka, SQS, pusher (distributed)
* subscription session data == in-memory (small) -> database/cache (distributed)
* currently powering live likes/comments, typing indicators, live video comments, reactions, many more
* live queries: just rerun queries.
* if T+1 to T+2, value goes from 5 -> 15, subscriptions tell you "this went up by 10" (observing events), live queries tell you "this is now 15" (observing state)
* subscriptions require event system + domain-specific events, live queries require a reactive data layer
* subscriptions tell you "why", live queries don't
july 2018
(17) Dan Schafer - GraphQL: Client-Driven Development - YouTube
* unapologetically driven by needs of frontend views
* language and runtime is built around that
* "think in graphs"--tried using SQL/FQL, did not work well
* "thin api layer"--there was still a huge monolith behind the iOS graphql (e.g. FB's 'ent' PHP monolith), they just replaced the FQL queries/proxies w/graphql queries/proxies

* "scaling models"--had been using coredata, so graphql query was mapped to coredata xml config. first by hand, then by codegen via .graphql files. so added fragments.
* only added fragments after proven need on the client.

* "scaling views"--large coredata files, mutable objects, but react/componentkit/litho one-way views now best practice, so were moving to flux across the board: immutable vended views. what are flux actions? command pattern. so added mutations.
* only added mutations after proven need on the client. "why top-level mutations"? it's flux. that is why there is no CRUD.

* "scaling updates"--subscriptions. 1st impl was 4 months long, prototyped with polling.

* "scaling the language"--added directives, @include(if), at last minute, cleaning up uglier field syntax.

everything was client-driven.
july 2018
Multiplatform native development in Kotlin. Now with iOS!
on module contains code that is not specific to any platform, as well as declarations without implementation of platform-dependent APIs. Those declarations allow common code to depend on platform-specific implementations.
july 2018
(17) Jason Lengstorf - GraphQL at Massive Scale as the Glue in IBM's Microservice Architecture - YouTube
* ibm cloud front-end will load dojo 1 and 2, 5 versions of angular, react. and of course jquery. sometimes react/dojo/jquery all in the same microservice.
* wild-west, written back when people didn't care about the frontend
* who "owns" the graphql proxy
* will one commit take down the entire graphql proxy/endpoint
* want to schemas out to u-services, then aggregate together. "data sources".
july 2018
(17) Adam Kramer - Managing Massive Schemas with Codegen - YouTube
* your graphql schema can/should be mapped 1:1 from your domain objects, e.g. with annotations.
* classes/methods --> types/fields
july 2018
SF hospital charged $15K ‘trauma response fee’ for baby that needed no treatment
EMT and ER can activate trauma response, and guidance is to over-activate for safety
july 2018
« earlier      
accounting advertising agile ai ajax algorithms amg android architecture art audio aws backup banking bizo bodybuilding boo books bugs business c# cache carpet cars chairs charts clothing coffee colors communication competitors cooking couchdb css cygwin dabbledb database del.icio.us design design/sparklines designers documentation drugs dvr dynamo eclipse ecommerce economics education email engineering exercise filetype:gif filetype:pdf finance firefox fitnesse flash flickr flute flute/discussion flute/ff flute/music flute/performances flute/used fonts food forbes freebsd furniture fuse games gardening gifts gis git go google government graphql grills grpc gtd guns guns/suppressor gwt gwt/bugs hadoop hardware health history hosting hotkey house/tables household html html/editor http humor i3 ie imaging interviews investing iphone ipod java java/gui java/jta java/multicast javascript jquery js js/jquery jsr168 jta keto keyboard knives labels laszlo lifting linux mac management markdown marketing math mealkits media:document media:image medicine memcache memory memory/apps messaging methodology microservices misc mom motivation music mvcc netty networking oauth office omaha orm os outlook outsourcing parenting parsing patents patterns performance philosophy photography photos photos/libraries php physics pm pocketpc podcast politics postgresql ppc presentation productivity progamming programming psychology python quickbooks quotes ra rails react realestate recipes regex religion remodeling remote research rest reviews rfc richclient richclient/javascript rowing rss ruby running s3 saas sales saunas scala scalability scheduler science scm scoliosis scrum security seo shipping shopify sleep smalltalk soap sousvide spark speech sports sql ssh ssl statistics stocks svn swift tags tapestry technology tempagency testing thinking thinkpad threads timetracking tools toread trac travel tvs typescript ubuntu ui uml unix usecases ux vc video vim violin webdav wiki win32 windows wmii writing xml xmonad xp yc

Copy this bookmark: