Skip to content

Instantly share code, notes, and snippets.

View quocthinhle's full-sized avatar
🗡️
Patience

Le Quoc Thinh quocthinhle

🗡️
Patience
View GitHub Profile
const postID = '4387428904674656'; // 'https://www.facebook.com/LienMinhHuyenThoai/posts/4387428904674656'
const accessToken = ''; // find 'EAAA' at 'https://m.facebook.com/composer/ocelot/async_loader/?publisher=feed'
const url = 'https://graph.facebook.com/' + postID + '/comments?fields=message&access_token=' + accessToken;
const analyze_comments = (url) => {
fetch(url)
.then((response) => response.json())
.then((results) => {
if (results) {
const comments = results.data;
comments.forEach((comment) => {
@thomasdarimont
thomasdarimont / TableDrivenTest.java
Last active April 22, 2024 08:47
Go like table-driven tests with JUnit5 and local records
package wb.junit5.tabledriven;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.DynamicTest;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.TestFactory;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.RecordComponent;
@tajnymag
tajnymag / tinder.user.js
Last active June 23, 2024 02:19
Tinder Deblur Userscript (ARCHIVED and DEPRECATED, see https://github.com/tajnymag/tinder-deblur)
// ==UserScript==
// @name Tinder Deblur
// @namespace Violentmonkey Scripts
// @match https://tinder.com/*
// @grant none
// @version 1.4
// @author Tajnymag
// @downloadURL https://raw.githubusercontent.com/tajnymag/tinder-deblur/main/tinder.user.js
// @description Simple script using the official Tinder API to get clean photos of the users who liked you
// ==/UserScript==
@FauxFaux
FauxFaux / readFileSync_vs_readFile.js
Last active March 19, 2022 04:12 — forked from Kirill89/readFileSync_vs_readFile.js
readFileSync vs readFile benchmark
const fs = require('fs');
const fsp = fs.promises;
const util = require('util');
const readFile = util.promisify(fs.readFile);
fs.writeFileSync('a', 'a');
const attempts = 10000;
@ygrenzinger
ygrenzinger / CleanArchitecture.md
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.

@lancejpollard
lancejpollard / node-folder-structure-options.md
Created November 28, 2011 01:50
What is your folder-structure preference for a large-scale Node.js project?

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin