Skip to content

Instantly share code, notes, and snippets.

@codeStryke
codeStryke / monaco-editor webpack.config.js
Created October 20, 2021 00:47
monaco-editor webpack.config.js for sql language
const TerserPlugin = require("terser-webpack-plugin");
const MonacoWebpackPlugin = require('monaco-editor-webpack-plugin');
const path = require('path');
module.exports = {
entry: './index.js',
mode: 'development',
optimization: {
minimize: false,
minimizer: [
@codeStryke
codeStryke / thoughts.md
Created September 7, 2018 21:40
Thoughts on writing clever code
  1. From http://read.humanjavascript.com/ch03-code-for-humans.html

    • Code is read more often than it's written.
    • If you're too clever, you'll forever own the project because no one else will know what the heck you're doing. That will suck, and so will your project.
    • As the requirements change and evolve (as they most certainly will), your ability to quickly read and understand the various pieces of your app will dramatically affect how quickly you can change course.

    All of this is to say: WRITE CODE THAT IS EASY TO READ!

@codeStryke
codeStryke / collapse-file-diffs.js
Created July 4, 2018 00:34
Collapse all file diffs in a PR
var elems = document.querySelectorAll('.js-details-target');
for( var i = 0; i < elems.length; i++ ) {
elems[i].click();
}
@codeStryke
codeStryke / config-files.md
Last active July 1, 2021 03:58
Create-react-app + eslint + prettier + airbnb config

package.json

{
  "engines": {
    "node": "8.11.3",
    "npm": "5.8.0"
  },
  "scripts": {
    "precommit": "lint-staged",
    "lint": "eslint '**/*.{js,jsx}'",

Keybase proof

I hereby claim:

  • I am codestryke on github.
  • I am anandraman (https://keybase.io/anandraman) on keybase.
  • I have a public key ASA86mxgPi2pITzV4qW-g3pIBEDaN_dDiuYfEoW-C-3sygo

To claim this, I am signing this object: