Skip to content

Instantly share code, notes, and snippets.

View thinhbuzz's full-sized avatar
🏠
Working from home

Mr.Buzz thinhbuzz

🏠
Working from home
View GitHub Profile
@thinhbuzz
thinhbuzz / discord.js
Last active January 23, 2024 08:13
get discord message by date range
const serverId = '1012618482094968903';
const channelId = '1193845566204035092';
const authorization = 'token string';
const startTime = 1704672000000;
const endTime = 1705190400000;
function pick(obj, keys) {
const result = {};
keys.forEach((key) => {
result[key] = obj[key];
@thinhbuzz
thinhbuzz / mhn-items.json
Last active November 2, 2023 14:47
Monster Hunter Now items
{
"IRON_ORE": {
"title": "Iron Ore",
"description": "Type of ore that can be mined from various places. A common material used for forging equipment, among other things.",
"rarity": 1,
"userItemSettingId": 1010001,
"imageAssetKey": "00511"
},
"MACHALITE_ORE": {
"title": "Machalite Ore",
Java.perform(function () {
const array_list = Java.use('java.util.ArrayList');
const ApiClient = Java.use('com.android.org.conscrypt.TrustManagerImpl');
ApiClient.checkTrustedRecursive.implementation = function () {
return array_list.$new();
};
});
@thinhbuzz
thinhbuzz / get_comment.js
Last active January 8, 2024 19:15
lấy hết comment trong bài viết của nhóm.
function getDTSG() {
return JSON.parse(document.querySelector("#__eqmc").textContent).f;
}
async function getComments(id, dtsg, reactions, after = "null") {
console.log(new Date().toLocaleString(), "Get comments....");
const urlencoded = new URLSearchParams();
urlencoded.append("__a", "1");
urlencoded.append("__comet_req", "15");
urlencoded.append("fb_dtsg", dtsg);
package net.pgtools.auto
import android.annotation.SuppressLint
import android.app.Service
import android.content.Intent
import android.hardware.Sensor
import android.hardware.SensorEvent
import android.hardware.SensorEventListener
import android.hardware.SensorManager
import android.os.IBinder
@thinhbuzz
thinhbuzz / bactch-remove-pokemon-go-friend.js
Last active March 2, 2024 01:52
Eliminate a series of pokemon go friends by keyword. Please read the first comment for the running steps.
(async () => {
function deleteFriend(friendId) {
return fetch("https://niantic-social-api.nianticlabs.com/niantic/graphql", {
headers: {
authorization: "Bearer " + localStorage.getItem("sessionToken"),
"content-type": "application/json",
},
body:
'{"query":"mutation RemoveFriendMutation(\\n $input: UnfriendNianticUserRequest!\\n) {\\n unfriendNianticUser(input: $input) {\\n friends {\\n userId\\n nianticId\\n displayName\\n gameProfiles {\\n game\\n codename\\n }\\n avatarUrl\\n }\\n success\\n }\\n}\\n","variables":{"input":{"userId":"' +
friendId +
@thinhbuzz
thinhbuzz / select2-local-pagination.js
Created October 8, 2021 11:00
select2 pagination without ajax
var items = Array.from(Array(500))
.fill(0)
.map(function (i, index) {
return {
id: index,
text: "item - " + index,
};
});
$(document).ready(function () {
$.fn.select2.amd.require(
@thinhbuzz
thinhbuzz / download.js
Last active January 7, 2024 05:15
Download all photos from facebook Page
(async () => {
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms));
}
function getPageId() {
const tags = Array.from(
document.body.querySelectorAll("script:not([src])")
);
@thinhbuzz
thinhbuzz / teleport.js
Last active June 19, 2021 09:48
moonani click to teleport
document.body.addEventListener('click', event => {
if (!event.target.matches('button[data-clipboard-text]')) {
return;
}
event.preventDefault();
const href = event.target.getAttribute('data-clipboard-text');
const location = href.split(',');
console.log(location);
fetch('http://localhost:4444/adb', {
@thinhbuzz
thinhbuzz / nginx.conf
Last active May 17, 2021 09:47
nginx config for react application
gzip on;
gzip_disable "msie6";
gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript image/svg+xml;
server {
listen 80 default_server;
listen [::]:80 default_server;
root /usr/share/nginx/html;