Skip to content

Instantly share code, notes, and snippets.

View lephuhai's full-sized avatar
🎯
Focusing

Hai Le Phu lephuhai

🎯
Focusing
View GitHub Profile
// ==UserScript==
// @name Extract Semrush data
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author HaiLP
// @match https://www.semrush.com/analytics/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=semrush.com
// @grant none
// ==/UserScript==
@lephuhai
lephuhai / dist.js
Last active June 30, 2022 05:01
Redirect to APKCombo
javascript:function redirect(a){a&&window.open("https://apkcombo.com"+a)}function apkmonk(){if(location.pathname.startsWith("/app/")||location.pathname.startsWith("/download-app/")){var a=location.pathname.replace("/app/","").replace("/download-app/","").split("/")[0];return{package_id:a,path:"/a/"+a}}return null}function uptodown(){if(document.getElementById("technical-information")){var a=document.getElementById("technical-information").getElementsByTagName("table")[0].rows[0].cells[2].innerText;return{package_id:a,path:"/a/"+a}}}function google_play(a){const t=new URLSearchParams(a||window.location.search);if(t.has("id"))return t.has("hl")&&"en"!==t.get("hl")?{path:"/"+t.get("hl")+"/a/"+t.get("id"),package_id:t.get("id")}:{path:"/a/"+t.get("id"),package_id:t.get("id")}}function apkfun(){var a=document.querySelector("[src='/image/svg/google-play.svg']").parentNode.getAttribute("href");return google_play(new URL(a).search)}function apkpure(){var a=window.location.pathname,t=3;3===a.indexOf("/",1)&&(t=4);var
@lephuhai
lephuhai / extract-google-search-result.js
Last active June 29, 2022 13:00
Extract Populars APK sites from Google Search Result
// ==UserScript==
// @name Extract Populars APK sites from Google Search Result
// @namespace https://apkcombo.com/
// @version 0.1
// @description try to take over the world!
// @author HaiLP
// @match *://*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=google.ro
// @grant none
// ==/UserScript==
@lephuhai
lephuhai / dist.js
Created June 29, 2022 09:08
Semrush UI modifier
document.querySelectorAll("[data-ui-name='DefinitionTable.Body']>[data-at='table-row']").forEach((e=>{var t=e.querySelector(".cl-display-url__icon").cloneNode(!0);t.style.position="absolute",t.style.right="-30px",t.style.top="0",e.querySelector("[data-at='display-keyword']").parentNode.appendChild(t)}));
@lephuhai
lephuhai / .gitlab-ci.yml
Last active September 7, 2020 08:49
.gitlab-ci.yml
image: gradle:latest
stages:
- build
create_diagrams:
stage: build
image: python:3.6
script:
- apt-get update && apt-get install -y graphviz
@lephuhai
lephuhai / diagram.py
Last active September 7, 2020 08:37
diagram.py
from diagrams import Cluster, Diagram, Edge
from diagrams.onprem.queue import Kafka
from diagrams.aws.database import Database
from diagrams.aws.integration import SQS
from diagrams.aws.compute import EC2
from diagrams.aws.general import General
from diagrams.onprem.compute import Server
with Diagram("Postback Event Processing", filename="diagram", show=False, direction="BT", graph_attr={"pad": "0"}):
with Cluster("Kafka Cluster (3 broker)"):
reference: http://stackoverflow.com/questions/21820715/how-to-install-latest-version-of-git-on-centos-6-x-7-x
yum install http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
yum update git
@lephuhai
lephuhai / youtube api video category id list
Created February 8, 2019 17:33 — forked from dgp/youtube api video category id list
youtube api video category id list
2 - Autos & Vehicles
1 - Film & Animation
10 - Music
15 - Pets & Animals
17 - Sports
18 - Short Movies
19 - Travel & Events
20 - Gaming
21 - Videoblogging
22 - People & Blogs
@lephuhai
lephuhai / mirror.conf
Created March 18, 2018 17:32 — forked from ctrlaltdylan/mirror.conf
The nginx server configuration file needed to host the MirrorMirror application
server {
listen 80;
server_name localhost;
root /home/pi/projects/MirrorMirror/public;
index index.html index.htm index.php;
charset utf-8;
location / {
zgrep -E "59978206debcc700428095d8|5997b602debcc7004281cc51|5997bb7ddebcc7004281eaf1|5997bf93debcc70042820266|5997bff4debcc700428204df|5997c027debcc70042820603|5997c032debcc70042820649|5997c033debcc70042820652|5997c043debcc700428206aa|5997c07cdebcc700428207d5|5997c089debcc70042820817|5997c09bdebcc7004282087b|5997c0bbdebcc7004282091c|5997c0e6debcc700428209ff|5997c0fedebcc70042820a7e|5997c107debcc70042820aa7|5997c11cdebcc70042820b1a|5997c122debcc70042820b3a|5997c135debcc70042820bb7|5997c138debcc70042820bc5|5997c148debcc70042820c13|5997c14cdebcc70042820c2a|5997c152debcc70042820c4c|5997c155debcc70042820c63|5997c165debcc70042820cc9|5997c198debcc70042820e01|5997c1a6debcc70042820e43|5997c1d4debcc70042820f35|5997c1e4debcc70042820f95|5997c1f4debcc70042820feb|5997c1f6debcc70042820ff5|5997c25bdebcc70042821275|5997c266debcc700428212bf|5997c26bdebcc700428212da|5997c287debcc70042821393|5997c2aedebcc7004282147e|5997c2bfdebcc700428214f0|5997c2d5debcc70042821580|5997c2e4debcc700428215dd|5997c307debcc700428216c2|5997c30adebcc7