I hereby claim:
-
I am dantehemerson on github.
-
I am dantehemerson (https://keybase.io/dantehemerson) on keybase.
-
I have a public key ASAqYmAbyHNHUDMtVPOqiPJftle74akWVK1QxTOdlZGczwo
| // Complexity: O(n log n) | |
| // Explanation: Sort the string and then check if a character is repeated | |
| // by comparing if 2 consecutive characters are the same. | |
| // | |
| // To avoid a new data structure I implemented the well known quick-sort algorithm | |
| // to sort the string so I avoid the split and join which creates an array (typically used to sort strings). | |
| // | |
| function isUnique(str) { | |
| const sortedString = quickSortString(str); // O (n log n) |
| { | |
| "title": "Remap app switcher to Vim-like keys", | |
| "rules": [ | |
| { | |
| "description": "Remap app switcher to Vim-like keys", | |
| "manipulators": [ | |
| { | |
| "type": "basic", | |
| "from": { | |
| "key_code": "tab", |
I hereby claim:
I am dantehemerson on github.
I am dantehemerson (https://keybase.io/dantehemerson) on keybase.
I have a public key ASAqYmAbyHNHUDMtVPOqiPJftle74akWVK1QxTOdlZGczwo
| export const regExpEscape = (s: any) => { | |
| return String(s) | |
| .replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, '\\$1') | |
| .replace(/\x08/g, '\\x08') | |
| } |
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
| import * as clone from 'clone' | |
| import { Injectable } from '@nestjs/common' | |
| import { ConfigService } from '@rate-manager/config' | |
| import { createTransport, SendMailOptions, Transporter } from 'nodemailer' | |
| import { of, from } from 'rxjs' | |
| import { tap, concatMap } from 'rxjs/operators' | |
| const inlineBase64 = require('nodemailer-plugin-inline-base64') | |
| @Injectable() |
| # | |
| # Working with branches | |
| # | |
| # Get the current branch name (not so useful in itself, but used in | |
| # other aliases) | |
| branch-name = "!git rev-parse --abbrev-ref HEAD" | |
| # Push the current branch to the remote "origin", and set it to track | |
| # the upstream branch | |
| publish = "!git push -u origin $(git branch-name)" |
FWIW: I didn't produce the content presented here (the outline from Edmond Lau's book). I've just copy-pasted it from somewhere over the Internet, but I cannot remember what exactly the original source is. I was also not able to find the author's name, so I cannot give him/her the proper credits.
| {"version":1,"resource":"file:///home/dantehemerson/Documents/repos/hangmant-api/src/modules/messages/messages.resolver.ts","entries":[{"id":"Dgrp.ts","timestamp":1657981742568},{"id":"tyD5.ts","timestamp":1658082118784},{"id":"qoDS.ts","timestamp":1658082136380},{"id":"PSFZ.ts","timestamp":1658082206270}]} |
| mysql> SHOW CHARACTER SET; | |
| +----------+-----------------------------+---------------------+--------+ | |
| | Charset | Description | Default collation | Maxlen | | |
| +----------+-----------------------------+---------------------+--------+ | |
| | big5 | Big5 Traditional Chinese | big5_chinese_ci | 2 | | |
| | dec8 | DEC West European | dec8_swedish_ci | 1 | | |
| | cp850 | DOS West European | cp850_general_ci | 1 | | |
| | hp8 | HP West European | hp8_english_ci | 1 | | |
| | koi8r | KOI8-R Relcom Russian | koi8r_general_ci | 1 | | |
| | latin1 | cp1252 West European | latin1_swedish_ci | 1 | |