Skip to content

Instantly share code, notes, and snippets.

View tienquanutc's full-sized avatar
🙂

Nguyễn Tiến Quân tienquanutc

🙂
View GitHub Profile
@tienquanutc
tienquanutc / github.css
Created May 20, 2024 11:57 — forked from tuzz/github.css
Github Markdown Stylesheet
/*
Copyright (c) 2017 Chris Patuzzo
https://twitter.com/chrispatuzzo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@tienquanutc
tienquanutc / DocumentMapper.java
Last active August 29, 2023 08:20
Convert Document to Pojo and back
package apkcombo.mongodb;
import com.mongodb.MongoClientSettings;
import org.bson.*;
import org.bson.codecs.Codec;
import org.bson.codecs.DecoderContext;
import org.bson.codecs.EncoderContext;
import org.bson.codecs.configuration.CodecProvider;
import org.bson.codecs.configuration.CodecRegistries;
import org.bson.codecs.configuration.CodecRegistry;
@tienquanutc
tienquanutc / AsyncInputStream.java
Created March 9, 2022 10:29 — forked from Stwissel/AsyncInputStream.java
Wrapping an InputStream into a ReadStream<Buffer> for vert.x
import io.vertx.core.*;
import io.vertx.core.buffer.Buffer;
import io.vertx.core.impl.Arguments;
import io.vertx.core.logging.Logger;
import io.vertx.core.logging.LoggerFactory;
import io.vertx.core.streams.ReadStream;
import io.vertx.core.streams.impl.InboundBuffer;
import java.io.IOException;
import java.io.InputStream;
@tienquanutc
tienquanutc / google-dorks
Created December 17, 2021 09:31 — forked from mehdichaouch/google-dorks
Listing of a number of useful Google dorks.
Explanations:
cache: If you include other words in the query, Google will highlight those words within
the cached document. For instance, [cache:www.google.com web] will show the cached
content with the word “web” highlighted. This functionality is also accessible by
clicking on the “Cached” link on Google’s main results page. The query [cache:] will
show the version of the web page that Google has in its cache. For instance,
[cache:www.google.com] will show Google’s cache of the Google homepage. Note there
can be no space between the “cache:” and the web page url.
------------------------------------------------------------------------------------------
@tienquanutc
tienquanutc / 00.install-android-sdk.sh
Created September 1, 2021 07:59 — forked from nhtua/00.install-android-sdk.sh
Run a Headless Android Device on Ubuntu server (no GUI)
#!/bin/bash -i
#using shebang with -i to enable interactive mode (auto load .bashrc)
set -e #stop immediately if any error happens
# Install Open SDK
apt update
apt install openjdk-8-jdk -y
update-java-alternatives --set java-1.8.0-openjdk-amd64
java -version
@tienquanutc
tienquanutc / webcrypto-examples.md
Created July 18, 2021 17:49 — forked from pedrouid/webcrypto-examples.md
Web Cryptography API Examples
var myHeaders=new Headers;myHeaders.append("authority","awc.lienquan.garena.vn"),myHeaders.append("pragma","no-cache"),myHeaders.append("cache-control","no-cache"),myHeaders.append("sec-ch-ua","\" Not;A Brand\";v=\"99\", \"Google Chrome\";v=\"91\", \"Chromium\";v=\"91\""),myHeaders.append("accept","*/*"),myHeaders.append("partition","null"),myHeaders.append("sec-ch-ua-mobile","?0"),myHeaders.append("user-agent","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36"),myHeaders.append("content-type","application/json"),myHeaders.append("origin","https://awc.lienquan.garena.vn"),myHeaders.append("sec-fetch-site","same-origin"),myHeaders.append("sec-fetch-mode","cors"),myHeaders.append("sec-fetch-dest","empty"),myHeaders.append("referer","https://awc.lienquan.garena.vn/"),myHeaders.append("accept-language","en-US,en;q=0.9");var raw=JSON.stringify([{operationName:"doDrawWheel",variables:{bet:2e4},query:"mutation doDrawWheel($bet: UInt32!) {\n drawWhee
var transformMessage=function(e,t){var a=(0,S.default)(t),n=a[0],r=a.slice(1);return k.default[e][n]?k.default[e][n](r):{type:n,data:r,};};var transformMessageArrayToObject=function(e,t){if(t) return e.reduce(function(e,a,n){return(e[a]=t[n]),e;},{});};var k={default:{CF:{CF:function(e){return{floor:e[0],ceilingCount:e[1],floorCount:e[2],};},SNAPSHOT:function(e){return{floor:e[0],floorCount:e[1],ceilingCount:e[2],tradingDate:e[3],};},},S:{SFU:function(e){var t=e[1];return"ST"===t?(0,transformMessageArrayToObject)(["code","stockType","floorCode","basicPrice","floorPrice","ceilingPrice","bidPrice01","bidPrice02","bidPrice03","bidPrice04","bidPrice05","bidPrice06","bidPrice07","bidPrice08","bidPrice09","bidPrice10","bidQtty01","bidQtty02","bidQtty03","bidQtty04","bidQtty05","bidQtty06","bidQtty07","bidQtty08","bidQtty09","bidQtty10","offerPrice01","offerPrice02","offerPrice03","offerPrice04","offerPrice05","offerPrice06","offerPrice07","offerPrice08","offerPrice09","offerPrice10","offerQtty01","offerQtty02","off
@tienquanutc
tienquanutc / rotate.js
Last active March 20, 2021 17:33
rotate.js
eval(atob("ZnVuY3Rpb24gYWRkQ3NzVG9Eb2N1bWVudChjc3MpewogIHZhciBzdHlsZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3N0eWxlJykKICBzdHlsZS5pbm5lclRleHQgPSBjc3MKICBkb2N1bWVudC5oZWFkLmFwcGVuZENoaWxkKHN0eWxlKQp9CmFkZENzc1RvRG9jdW1lbnQoYGJvZHl7LXdlYmtpdC1hbmltYXRpb246cm90YXRpb24gMXMgaW5maW5pdGUgbGluZWFyfUAtd2Via2l0LWtleWZyYW1lcyByb3RhdGlvbntmcm9tey13ZWJraXQtdHJhbnNmb3JtOnJvdGF0ZSgwZGVnKX10b3std2Via2l0LXRyYW5zZm9ybTpyb3RhdGUoMzU5ZGVnKX19YCkK"))
@tienquanutc
tienquanutc / rotate.css
Created March 12, 2021 15:37
rotate.css
#loading {
-webkit-animation: rotation 1s infinite linear;
}
@-webkit-keyframes rotation {
from {
-webkit-transform: rotate(0deg);
}
to {
-webkit-transform: rotate(359deg);