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 / sqlmap-cheat-sheet.md
Created April 1, 2018 16:14 — forked from jkullick/sqlmap-cheat-sheet.md
SQLMap Cheat Sheet
# Enumerate databases
sqlmap --dbms=mysql -u "$URL" --dbs

# Enumerate tables
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" --tables

# Dump table data
sqlmap --dbms=mysql -u "$URL" -D "$DATABASE" -T "$TABLE" --dump
@trungx
trungx / facebook-mass-delete-group-members.js
Created April 1, 2018 16:15 — forked from michaelv/facebook-mass-delete-group-members.js
This javascript removes all users from a facebook group. It works with the new facebook layout. Paste this in the javascript console. Script tested in Firefox. Known issues: 1. when facebook responds slowly, the script might experience hickups.. 2. occasionially, the error 'this user is not a member of the group' pops up.. IMPORTANT: add your ow…
var deleteAllGroupMembers = (function () {
var deleteAllGroupMembers = {};
// the facebook ids of the users that will not be removed.
// IMPORTANT: add your own facebook id here so that the script will not remove yourself!
var excludedFbIds = ['1234','11223344']; // make sure each id is a string!
var usersToDeleteQueue = [];
var scriptEnabled = false;
var processing = false;
deleteAllGroupMembers.start = function() {
@trungx
trungx / 45 Useful JavaScript Tips, Tricks and Best Practices.txt
Last active April 2, 2018 04:15
45 Useful JavaScript Tips, Tricks and Best Practices
1 – Don’t forget var keyword when assigning a variable’s value for the first time.
Assignment to an undeclared variable automatically results in a global variable being created. Avoid global variables.
2 – use === instead of ==
The == (or !=) operator performs an automatic type conversion if needed. The === (or !==) operator will not perform any conversion. It compares the value and the type, which could be considered faster than ==.
[10] === 10 // is false
[10] == 10 // is true
@trungx
trungx / revert_a_merge.md
Created April 6, 2018 02:50 — forked from lifuzu/revert_a_merge.md
revert a merge commit that's already pushed to remote branch

The -m option specifies the parent number. This is because a merge commit has more than one parent, and Git does not know automatically which parent was the mainline, and which parent was the branch you want to un-merge.

When you view a merge commit in the output of git log, you will see its parents listed on the line that begins with Merge:

commit 8f937c683929b08379097828c8a04350b9b8e183
Merge: 8989ee0 7c6b236
Author: Ben James <[email protected]>
Date:   Wed Aug 17 22:49:41 2011 +0100

Merge branch 'gh-pages'
‎Nguyễn Lâm‎ to Phong Vũ Hội
13 mins ·
CÁCH TĂNG TÔC WIN 10!!📢📢📢
✔1. Cài win trên ổ SSD💾💾💾 khởi động nhanh như QuickSilver
✔2. Thiết lập chính sách cập nhật
-Để thiết lập chính sách cập nhật Windows hãy chọn nhánh Computer Configuration > Administrative Templates > Windows Components > Windows Update. Tùy chọn ‘Auto Download/Notify to Install’ cho phép người dùng quyết định khi nào thì các bản cập nhật được áp dụng.
✔3. Dùng tài khoản quản trị ẩn
-Từ menu Start gõ cmd rồi nhấn phải chuột vào dòng kết quả tìm thấy ‘Command Prompt’ và chọn ‘Run as Administrator’. Giao diện dòng lệnh hiện ra, từ dấu nhắc hãy gõ: net user administrator /active:yes rồi nhấn phím Enter. Theo mặc định, tài khoản quản trị này chưa có mật khẩu, do vậy bạn cần gán mật khẩu cho nó, bằng cách gõ vào dòng lệnh: net user administrator * để tạo mật khẩu tài khoản.
Nếu về sau muốn ẩn nó thì tại dấu nhắc giao diện dòng lệnh bạn gõ: net user administrator /active:no rồi nhấn phím Enter.
✔4.Tự động dọn dẹp ổ cứng
@trungx
trungx / sublime-text-3-windows-shortcuts.md
Created April 12, 2018 02:28 — forked from mrliptontea/sublime-text-3-windows-shortcuts.md
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 - Useful Shortcuts (Windows)

General

Shortcut Description
Ctrl+Shift+P command prompt
Ctrl+Alt+P switch project
Ctrl+P go to file
Ctrl+G go to line
@trungx
trungx / centered.md
Created April 14, 2018 07:54 — forked from ProjectCleverWeb/centered.md
Example of how to do centered text and images in Githb Flavored Markdown
@trungx
trungx / user.json
Created May 2, 2018 01:39
sublimetext3 setting
{
"theme": "Boxy Ocean.sublime-theme",
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Ocean.tmTheme",
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Ocean.tmTheme",
"theme": "Boxy Ocean.sublime-theme",
"theme_accent_purple": true,
"theme_bar": true,
"theme_find_panel_close_hidden": true,
"theme_size_md": true,
"theme_tab_line_size_lg": true,
@trungx
trungx / new.html
Created May 7, 2018 01:37 — forked from isstaif/new.html
Simple website using PHP and MySQL
<form action='newpost.php' method=post>
Title: <input type=text name=title />
Body: <input type=text name=body />
<input type=submit />
</form>
@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