Skip to content

Instantly share code, notes, and snippets.

View daubac402's full-sized avatar
🇻🇳
🎄

NguyenTheAnh daubac402

🇻🇳
🎄
View GitHub Profile
@daubac402
daubac402 / Aircrack-ng Commands (MAC OS)
Last active September 5, 2018 03:01 — forked from victorreyesh/Aircrack Commands
Cracking WPA2 / WEP Wifi / Aircrack 10 seconds guide. For Mac OSX
//Install Macports or brew
//Install aircrack-ng
sudo port install aircrack-ng
//or
brew install aircrack-ng
//Install the latest Xcode, with the Command Line Tools
//Create the following symlink
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/sbin/airport
@daubac402
daubac402 / List all crontabs for all users on UNIX systems
Last active July 19, 2021 01:08 — forked from jvsidler/gist:4610255
List all crontabs for all users on UNIX systems
# Must be root
# Credit: http://stackoverflow.com/questions/134906/how-do-i-list-all-cron-jobs-for-all-users
$ for user in $(cut -f1 -d: /etc/passwd); do echo $user; crontab -u $user -l; done
## This will be fixed by
find /var/www -type d -exec chmod 755 {} \;
find /var/www -type f -exec chmod 644 {} \;
@daubac402
daubac402 / self-signed-certificate-with-custom-ca.md
Last active April 7, 2021 05:45 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

1. Create Root CA (Done once)

1.1. Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
@daubac402
daubac402 / minification.md
Created April 9, 2021 08:42 — forked from gaearon/minification.md
How to Set Up Minification

In production, it is recommended to minify any JavaScript code that is included with your application. Minification can help your website load several times faster, especially as the size of your JavaScript source code grows.

Here's one way to set it up:

  1. Install Node.js
  2. Run npm init -y in your project folder (don't skip this step!)
  3. Run npm install terser

Now, to minify a file called like_button.js, run in the terminal:

@daubac402
daubac402 / git.migrate
Created January 28, 2022 04:57 — forked from niksumeiko/git.migrate
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@daubac402
daubac402 / install-docker.md
Created May 23, 2022 02:42 — forked from npearce/install-docker.md
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start