Skip to content

Instantly share code, notes, and snippets.

@dinhtuan1406
dinhtuan1406 / cpu.ps1
Last active November 13, 2025 04:39
Check CPU with full information
Clear-Host
Write-Host "==========================" -ForegroundColor Cyan
Write-Host " THÔNG TIN PHẦN CỨNG MÁY TÍNH" -ForegroundColor Cyan
Write-Host "==========================" -ForegroundColor Cyan
# ==========================
# CPU
# ==========================
Write-Host "`n==== CPU ====" -ForegroundColor Cyan
Get-CimInstance Win32_Processor | Select-Object `
@dinhtuan1406
dinhtuan1406 / download_GoogleDrive.py
Created October 30, 2023 16:22 — forked from henrych4/download_GoogleDrive.py
A python script for downloading file in google drive
#Reference: https://stackoverflow.com/questions/38511444/python-download-files-from-google-drive-using-url
import requests
def download_file_from_google_drive(id, destination):
URL = "https://docs.google.com/uc?export=download"
session = requests.Session()
response = session.get(URL, params = { 'id' : id }, stream = True)
@dinhtuan1406
dinhtuan1406 / force-ssl-url-scheme.php
Created April 15, 2023 14:51 — forked from webaware/force-ssl-url-scheme.php
For WordPress, force the protocol scheme to be HTTPS when is_ssl() doesn't work, e.g. on a load-balanced server where _SERVER['HTTPS'] and _SERVER['SERVER_PORT'] don't indicate that SSL is being used. NB: may not be needed now, see SSL Insecure Content Fixer and HTTP Detection: https://ssl.webaware.net.au/https-detection/
<?php
/*
Plugin Name: Force SSL URL Scheme
Plugin URI: https://gist.github.com/webaware/4688802
Description: Force the protocol scheme to be HTTPS when is_ssl() doesn't work
Version: 1.0.0
Author: WebAware
Author URI: http://webaware.com.au/
@ref: http://wordpress.org/support/topic/ssl-insecure-needs-35-compatibility
@dinhtuan1406
dinhtuan1406 / copyright.js
Created May 4, 2020 00:27 — forked from behitek/copyright.js
Thêm copyright khi người dùng copy dữ liệu từ website
@dinhtuan1406
dinhtuan1406 / crawler.php
Created April 12, 2020 16:22 — forked from ichigo92/crawler.php
PHP Crawler using CURL
<?php
//url
$redirect = "http://www.eyeofriyadh.com/events/";
$event = getEvents($redirect);
echo "Dates are : <br>" . $event;
@dinhtuan1406
dinhtuan1406 / gist:8244ce9fd892309b142bb4bfd16ad4ed
Created April 9, 2020 13:49 — forked from thachpham92/gist:d57b18cf02e3550acdb5
Tất cả các tham số trong WP_Query
// Source: https://gist.github.com/luetkemj/2023628
// Xem hướng dẫn WP_Query toàn tập: http://goo.gl/kRpzTz
<?php
$args = array(
//////Author Parameters - Tham số lấy bài viết theo tác giả
//http://codex.wordpress.org/Class_Reference/WP_Query#Author_Parameters
'author' => '1,2,3,', //(int) - Các ID tác giả cần lấy bài viết (thêm dấu - vào để loại trừ tác giả, ví dụ: -14, -20)
'author_name' => 'luetkemj', //(string) - Lấy bài viết dựa theo tên nick name của tác giả
'author__in' => array( 2, 6 ), //(array) - Lấy bài dựa theo ID của tác giả
@dinhtuan1406
dinhtuan1406 / reclaimWindows10.ps1
Created February 5, 2020 09:03 — forked from alirobe/reclaimWindows10.ps1
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
##########
# Tweaked Win10 Initial Setup Script
# Primary Author: Disassembler <[email protected]>
# Modified by: alirobe <[email protected]> based on my personal preferences.
# Version: 2.20.2, 2018-09-14
# Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script
# Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/
# Tweak difference:
#
# @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ...
@dinhtuan1406
dinhtuan1406 / sublime-text-scopes.md
Created January 16, 2020 08:28 — forked from J2TEAM/sublime-text-scopes.md
Sublime Text 2/3: Snippet scopes

Here is a list of scopes to use in Sublime Text 2/3 snippets -

ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
@dinhtuan1406
dinhtuan1406 / unlikeAllPages.js
Created August 6, 2019 04:23 — forked from monokaijs/unlikeAllPages.js
Unlike all your liked pages
(() => {
/*
*
* @author: MonokaiJs
* @facebook: fb.me/MonokaiJsp
*
*/
const ACCESS_TOKEN = 'EAAAA-put-your-access-token-here';
let xhr = new XMLHttpRequest;
xhr.open('GET', `https://graph.facebook.com/me/likes?access_token=${ACCESS_TOKEN}`);
@dinhtuan1406
dinhtuan1406 / demo.php
Created November 9, 2018 18:20 — forked from thinhbg59/demo.php
Add ux builder shortcode - Flatsome Theme
<?php
/*
Plugin Name: OT Flatsome Ultimate Addons
Plugin URI: https://ninewp.com
Description: OT Flatsome Ultimate Addons
Version: 1.0.0
Author: thinhbg59
Text Domain: OT_FL_Ultimate_Addons
Domain Path: /languages