Skip to content

Instantly share code, notes, and snippets.

View bndynet's full-sized avatar

Bendy Zhang bndynet

View GitHub Profile
@bndynet
bndynet / unlimited_trials_babeledit.txt
Created January 28, 2021 03:19 — forked from Fusseldieb/unlimited_trials_babeledit.txt
Activate BabelEdit temporarily / Unlimited trial
Obviously for educative purposes only.
Furthermore, this DOESN'T activate BabelEdit permanently.
If you like the software, buy it, the devs deserve it.
Since I have no money to buy it, I discovered a workaround for unlimited trials.
It's quite a annoying workaround, but ... it works!
Firstly go to "c:\windows\system32\drivers\etc\" and open the "hosts" file in Notepad/Notepad++/VSCode/Sublime/Atom/whatever as admin (if you don't open it as admin, it won't let you save it).
Add this line at the end of the file:
@bndynet
bndynet / default.md
Last active May 17, 2019 02:26
JavaScript Unit Testing - Jest

Important issues for Jest

Configurations for DOM Support

Use document object and methods like document.querySelectorAll...

_setup.ts

import "jsdom-global/register";
@bndynet
bndynet / default.md
Last active April 19, 2019 02:53
Spring Things

Things to Know Getting Started With Spring...

Custom Error

Disabling the Whitelabel Error Page

S1: In application.properties server.error.whitelabel.enabled=false

S2: Excluding the ErrorMvcAutoConfiguration bean

@bndynet
bndynet / default.md
Created April 2, 2019 07:59
React/JSX Style Guide

React/JSX Style Guide

A mostly reasonable approach to React and JSX

This style guide is mostly based on the standards that are currently prevalent in JavaScript, although some conventions (i.e async/await or static class fields) may still be included or prohibited on a case-by-case basis. Currently, anything prior to stage 3 is not included nor recommended in this guide.

Table of Contents

  1. Basic Rules
  2. Class vs React.createClass vs stateless
@bndynet
bndynet / default.md
Last active May 8, 2019 01:33
CSS Arrow

Code for arrows in CSS

.arrow-left {
  display: inline-block;

  
  position: relative;
  width: 0; 
 height: 0; 
@bndynet
bndynet / default.md
Last active January 23, 2019 14:21
Use @semantic to release package to NPM and publish docs to gh-pages automatically

Describe how to release package to NPM and publish gh-pages according to your commits automatically.

#awef

  1. Install requisite dependencies
# run local scripts for executing ts file for deploying docs
npm i -D @types/node
npm i -D ts-node
@bndynet
bndynet / default.md
Created January 16, 2019 03:10
How to package your React Component for distribution via NPM

1. MAKE A PACKAGE NPM PUBLISHABLE

npm init

In the package.json, make sure these fields are populated: package.json

{
    "name": "myUnflappableComponent",
    "version": "0.0.29",
    "main": "dist/index.js",
@bndynet
bndynet / iterm2-solarized.md
Created January 15, 2019 08:20 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

GitHub OAuth Busy Developer's Guide

This is a quick guide to OAuth2 support in GitHub for developers. This is still experimental and could change at any moment. This Gist will serve as a living document until it becomes finalized at Develop.GitHub.com.

OAuth2 is a protocol that lets external apps request authorization to private details in your GitHub account without getting your password. All developers need to register their application before getting started.

Web Application Flow

  • Redirect to this link to request GitHub access:
@bndynet
bndynet / react.md
Last active May 30, 2019 02:20
React Notes

Notes for starting React

React

The Component Lifecycle

Mounting

These methods are called in the following order when an instance of a component is being created and inserted into the DOM:

  • constructor()