BEGIN TRANSACTION; | |
CREATE TABLE [ios] ( | |
[ios] TEXT, | |
[path] TEXT, | |
[parent] TEXT, | |
[filename] TEXT, | |
[languages] TEXT | |
); | |
INSERT INTO "ios" VALUES('iOS1','/Applications/Calculator.app/Calculator','/Applications/Calculator.app','Calculator','["Objective-C"]'); | |
INSERT INTO "ios" VALUES('iOS1','/Applications/DemoApp.app/DemoApp','/Applications/DemoApp.app','DemoApp','["Objective-C"]'); |
import * as app from '.'; | |
import * as api from '@nestjs/common'; | |
@api.Controller() | |
export class TestController { | |
@api.Get() | |
@app.ResponseValidator(app.TestDto) | |
get() { | |
return new app.TestDto(); | |
} |
const { spawn } = require('child_process') | |
const Xml = require('xml-stream') | |
const fetch = require('node-fetch') | |
const cheerio = require('cheerio') | |
// apple returns IDs in funny order | |
const unmangleID = string => { | |
if (string) { | |
const s = string.split('').slice(0, 4) | |
return `${s[2]}${s[3]}${s[0]}${s[1]}` |
{ | |
"presets": [ | |
["env", { "targets": {"node": "current" }, "debug": true }], | |
"stage-0" | |
], | |
"plugins": [ | |
"transform-decorators-legacy", | |
"transform-runtime" | |
] |
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!!!!
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
Anki is a great open source flashcard app that can be used to learn anything.
This Gist is a full end to end example of how to:
- export Anki decks from Anki
- import Anki decks into MySQL
- edit Anki decks using MySQL
- export Anki decks from MySQL
Make a bookmarklet with this code: | |
javascript:!function(e){function t(u){if(n[u])return n[u].exports;var r=n[u]={exports:{},id:u,loaded:!1};return e[u].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){function u(){}function r(e){console.log("pageX",e.pageX,"pageY",e.pageY),T("#speaker").css({left:e.pageX-T("#speaker").width()/2+15,top:e.pageY-T("#speaker").height()/2+15,display:"block",width:"100px",height:"100px","margin-left":"-30px","margin-top":"-30px",opacity:"1"}),T("#speaker").each(function(e,t){T(t).animate({opacity:0,left:"+="+T(t).width()/4,top:"+="+T(t).height()/4,height:0,width:0},500,function(){T(t).hide()})})}function i(e,t,n){if("SCRIPT"!=e.tagName&&"math"!=e.tagName&&"CODE"!=e.tagName&&"BUTTON"!=e.tagName&&"STYLE"!=e.tagName&&"ASIDE"!=e.tagName&&"PRE"!=e.tagName){var u=T(e).css("float"),r="left"==u||"right"==u;if(!(T(e).width()<500&&r)){if(e.classList)for(var o=0;o<e.classList.length;o++){if("word"==e.classList[o]||"MathJax"==e.clas |
// see for screenshot: | |
// https://twitter.com/paul_irish/status/829090506084749312 | |
const http = require('http'); | |
function requestHandler(request, response) { | |
const headers = { | |
'Server-Timing': ` | |
sql-1;desc="MySQL lookup Server";dur=100, | |
sql-2;dur=900;desc="MySQL shard Server #1", |