Skip to content

Instantly share code, notes, and snippets.

View trungx's full-sized avatar
🚩
Go to 2022

trungx

🚩
Go to 2022
View GitHub Profile
@trungx
trungx / php7_pthreads.sh
Created May 7, 2018 06:57 — forked from giapt/php7_pthreads.sh
PHP7 with Thread
#!/bin/bash
apt-get update
apt install -y libzip-dev bison autoconf build-essential pkg-config git-core \
libltdl-dev libbz2-dev libxml2-dev libxslt1-dev libssl-dev libicu-dev \
libpspell-dev libenchant-dev libmcrypt-dev libpng-dev libjpeg8-dev \
libfreetype6-dev libmysqlclient-dev libreadline-dev libcurl4-openssl-dev
cd $HOME
wget https://github.com/php/php-src/archive/php-7.2.4.tar.gz
tar --extract --gzip --file php-7.2.4.tar.gz
@trungx
trungx / _notes.md
Created May 7, 2018 10:05 — forked from sgnl/_notes.md
AJAX with Vanilla Javascript. (XMLHttpRequest)

Short XHR Examples

Examples shown are bare minimum needed to achieve a simple goal.

Resources

  • Google Chrome's Dev Tools' Network Panel c-c-c-c-c-ULTIMATE c-c-c-COMBO!!!
  • requestb.in enpoints for your HTTP Requests as a free service.
@trungx
trungx / PHP Clean It
Created May 15, 2018 04:07 — forked from james2doyle/PHP Clean It
php cleanstring function
function cleanit($input) {
$input = trim(preg_replace('/\s*\([^)]*\)/', '', $input));
$input = preg_replace('/[^a-zA-Z0-9]/s', '', $input);
return strtolower($input);
}
@trungx
trungx / php7.php
Last active May 15, 2018 05:21
the new feature
<?php
/**
* Scalar type declarations
*/
//declare(strict_types=1);
function add(int $a, int $b){
return $a + $b;
@trungx
trungx / bitsadmin.md
Created May 15, 2018 16:44 — forked from xnohat/bitsadmin.md
Use bitsadmin to download via the command line on Windows 7 (8?)

Download via the command line on Windows 7

If you want to test your connection or have some other reason to use the command line to download a file, this is how.

See http://superuser.com/a/284147 for more information.

Open cmd.exe and use this format:

bitsadmin /transfer debjob /download /priority normal http://cdimage.debian.org/debian-cd/current-live/i386/iso-hybrid/debian-live-8.7.1-i386-xfce-desktop.iso D:\Users\[Username]\Downloads\debian-live-8.7.1-i386-xfce-desktop.iso
function make_friendly_link(s) {
if (typeof s == "undefined") {
return;
}
var i=0,uni1,arr1;
var newclean=s;
uni1 = 'à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ|À|Á|Ạ|Ả|Ã|Â|Ầ|Ấ|Ậ|Ẩ|Ẫ|Ă|Ằ|Ắ|Ặ|Ẳ|Ẵ|A';
arr1 = uni1.split('|');
for (i=0; i<uni1.length; i++) newclean = newclean.replace(uni1[i],'a');
1. Tạo một cửa sổ Windows giả bằng Notepad
error.vbs
X=Msgbox(“Message Here”,0+16,”Title Here”)
----------------------------
Change "0" to these as desired:
0: Normal message box,
2: OK and Cancel,
3: Abort, Retry, Ignore,
4: Yes, No, Cancel,
5: Yes and No,
HƯỚNG DẪN FIX LỖI "PLUGS IN NOT CHARGING"
1. window + X
2. Device Manager
3. Batteries
4. uninstall Microsoft AC Adapter
5. uninstall Microsoft ACPI-Compliant Control Method Battery
6. vào link >> http://batcmd.com/windows/10/services/cmbatt/
7. chọn bản windows và version và download
8. chạy file vừa download ở quyền admin
—– BEGIN LICENSE —–
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
5653E0A0 BACE3948 BB2EE45E 422D2C87
@trungx
trungx / mbam.txt
Created May 25, 2018 12:04
mbam.key
Share key Malwarebytes 3.5.1 Premium lifetime
ID: 5AY33
Key: QLYF-A5XT-H85K-9252
ID: 3JA78
Key:TRAQ-J79G-A7NM-MT7B
ID: 9AD59
Key:E97G-TJF5-HDTF-4HPR