Skip to content

Instantly share code, notes, and snippets.

View hoanganh25991's full-sized avatar

Anh Le hoanganh25991

  • https://originallyus.sg
  • Vietnam
View GitHub Profile
@lucduong
lucduong / .gitconfig
Last active January 9, 2019 04:24
Git Config
[alias]
st = status
ci = commit -v
co = checkout
up = pull origin
info = remote -v
d = diff
df = diff
dfc = diff --cached
dc = diff --cached
@LiveOverflow
LiveOverflow / googlectf2018_js_safe_2.py
Last active March 15, 2023 02:54
GoogleCTF2018 - JS Safe 2
import random
import re
# python3
# STAGE 1
"""
stage1 = 'Ӈ#7ùª9¨M¤ŸÀ.áÔ¥6¦¨¹.ÿÓÂ.։£JºÓ¹WþʖmãÖÚG¤…¢dÈ9&òªћ#³­1᧨'
out = ""
key = "\x82\x1e\x0a\x9a"
@ygrenzinger
ygrenzinger / CleanArchitecture.md
Last active March 31, 2024 13:57
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
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
geoffreydhuyvetters / react_fiber.md
Last active January 13, 2023 06:49
What is React Fiber? And how can I try it out today?
@augbog
augbog / Free O'Reilly Books.md
Last active April 24, 2024 10:37
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 download.sh 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 download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@geuis
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
chantastic / on-jsx.markdown
Last active March 20, 2024 01:03
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
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
staltz / introrx.md
Last active April 24, 2024 19:47
The introduction to Reactive Programming you've been missing