Skip to content

Instantly share code, notes, and snippets.

View d2s's full-sized avatar

Daniel Schildt d2s

View GitHub Profile
@swyxio
swyxio / 1.md
Last active February 8, 2024 22:30
Learn In Public - 7 opinions for your tech career

2019 update: this essay has been updated on my personal site, together with a followup on how to get started

2020 update: I'm now writing a book with updated versions of all these essays and 35 other chapters!!!!

1. Learn in public

If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.

You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos

Time Travel Debugging

Time Travel refers to the ability to record a tab and later replay it ([WebReplay][wrr]). The technology is useful for local development, where you might want to:

  • pause and step forwards or backwards
  • pause and rewind to a prior state
  • rewind to the time a console message was logged
  • rewind to the time an element had a certain style or layout
  • rewind to the time a network asset loaded
@gaearon
gaearon / minification.md
Last active March 4, 2024 12:45
How to Set Up Minification

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal:

@kimschles
kimschles / Simplest-Express-Server.md
Last active June 15, 2018 22:19
Simplest Express Server
  1. Make a directory
  2. Change into the directory
  3. Create a file called index.js
  4. Install the Express package with npm install express
  5. Copy and paste the Express Server Code
  6. Run your server with node index.js
  7. Look at what's being served up at localhost:3000
  8. Make a change to serve JSON instead of text
@timelyportfolio
timelyportfolio / Readme.md
Last active November 14, 2018 01:05
R Shiny + vuejs treeview

vuejs + Shiny

More Advanced Example

vuejs is beautiful and works extremely well with R, since vuejs does not require and all-in contract to use it. I have played quite a bit with R htmltools and vuejs, but until today, I have not explored Shiny with vuejs. This earlier gist R Shiny and Vue Simple Example offers a very simple illustration of how Shiny and vuejs can be best friends. Now, let's build from that example and get a TreeView of a Shiny plot brush.

Code

library(shiny)
@timelyportfolio
timelyportfolio / Readme.md
Last active July 21, 2021 14:36
R Shiny and Vue Simple Example

Shiny == good & Vue == good | Shiny + Vue == good?

Shiny Shiny.shinyapp.$inputValues acts like a store of state. I thought it would be fun to let vuejs react to changes in Shiny input values. This example is intentionally very simple to hopefully self-explain.

vueR

I have assembled vueR package, like d3r and reactR, to offer helpers for vuejs. For this example please install vueR, or just add tags$script(src = "https://unpkg.com/vue@2.2.6") to the tagList().

devtools::install_github("timelyportfolio/vueR")`
@jevakallio
jevakallio / reactiveconf-slam-poetry.md
Last active July 7, 2021 19:57
#ReactiveConf 2017 Lightning Talk Submission: JavaScript Slam Poetry

TL;DR: If you want to see me perform a spoken word poem about JavaScript in front of 1000 people (and on video), please ⭐ star this gist. If you're on mobile, you'll need to request desktop site.

JavaScript Slam Poetry

Javascript! Slam! Poetry!

@max-mapper
max-mapper / datagovmetadata.json
Created February 14, 2017 21:54
EOP-GOV Metadata
{"help": "https://catalog.data.gov/api/3/action/help_show?name=package_search", "success": true, "result": {"count": 48, "sort": "views_recent desc", "facets": {}, "results": [{"license_title": "License not specified", "maintainer": "New Media", "relationships_as_object": [], "private": false, "maintainer_email": "newmedia@whitehouse.gov", "num_tags": 5, "id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "metadata_created": "2016-07-02T10:06:26.199575", "metadata_modified": "2016-07-02T10:06:26.199575", "author": null, "author_email": null, "state": "active", "version": null, "creator_user_id": "47303a9e-1187-4290-85a3-1fc02dc49e4a", "type": "dataset", "resources": [{"cache_last_updated": null, "package_id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "webstore_last_updated": null, "id": "3a8a0ad1-19e7-4153-bb2f-d70cf88aaaf8", "size": null, "state": "active", "hash": "", "description": "", "format": "CSV", "tracking_summary": {"total": 32, "recent": 1}, "last_modified": null, "url_type": null, "no_real_name": "True",
@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would