Skip to content

Instantly share code, notes, and snippets.

View hoanganh25991's full-sized avatar

Anh Le hoanganh25991

  • Vietnam
View GitHub Profile
lucduong / .gitconfig
Last active January 9, 2019 04:24
Git Config
st = status
ci = commit -v
co = checkout
up = pull origin
info = remote -v
d = diff
df = diff
dfc = diff --cached
dc = diff --cached
LiveOverflow /
Last active March 15, 2023 02:54
GoogleCTF2018 - JS Safe 2
import random
import re
# python3
stage1 = 'Ӈ#7ùª9¨M¤ŸÀ.áÔ¥6¦¨¹.ÿÓÂ.։£JºÓ¹WþʖmãÖÚG¤…¢dÈ9&òªћ#³­1᧨'
out = ""
key = "\x82\x1e\x0a\x9a"
ygrenzinger /
Last active June 13, 2024 09:52
Summary of Clean Architecture by Robert C. Martin

Summary of book "Clean Architecture" by Robert C. Martin

Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.

Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.

Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.

The book is build around 34 chapters organised in chapters.

cpsubrian / db.js
Last active June 13, 2023 06:59
Mock knex database for Jest
/* eslint-env jest */
import _ from 'lodash'
import path from 'path'
import fs from 'fs'
import callsites from 'callsites'
import knex from 'knex'
import hash from 'object-hash'
import conf from '<conf>'
// Get the db config.
geoffreydhuyvetters /
Last active January 13, 2023 06:49
What is React Fiber? And how can I try it out today?
augbog / Free O'Reilly
Last active May 14, 2024 10:27
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x should do it)
  3. Run ./ and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
geuis / gist:8b1b2ea57d7f9a9ae22f80d4fbf5b97f
Last active January 10, 2024 16:43
Get Youtube video urls
// Run from the dev tools console of any Youtube video
// Accurate as of July 2, 2020.
// Copy and paste this into the dev console in a browser with the desired video loaded.
// NOTE: Some Youtube videos do not directly expose the video url in the response.
// This script doesn't currently attempt to handle those. It will work for most other general video types though.
(async () => {
const html = await fetch(window.location.href).then((resp) => resp.text()).then((text) => text);
chantastic / on-jsx.markdown
Last active May 30, 2024 13:11
JSX, a year in

Hi Nicholas,

I saw you tweet about JSX yesterday. It seemed like the discussion devolved pretty quickly but I wanted to share our experience over the last year. I understand your concerns. I've made similar remarks about JSX. When we started using it Planning Center, I led the charge to write React without it. I don't imagine I'd have much to say that you haven't considered but, if it's helpful, here's a pattern that changed my opinion:

The idea that "React is the V in MVC" is disingenuous. It's a good pitch but, for many of us, it feels like in invitation to repeat our history of coupled views. In practice, React is the V and the C. Dan Abramov describes the division as Smart and Dumb Components. At our office, we call them stateless and container components (view-controllers if we're Flux). The idea is pretty simple: components can't

sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
componentDidMount() {
this.setState({ data: 'Hello' });
render() {
staltz /
Last active June 21, 2024 12:27
The introduction to Reactive Programming you've been missing