Skip to content

Instantly share code, notes, and snippets.

View mrsinguyen's full-sized avatar
🎯
Focusing

Si Nguyen mrsinguyen

🎯
Focusing
View GitHub Profile
@mrsinguyen
mrsinguyen / UUID.php
Created August 18, 2019 06:31 — forked from dahnielson/UUID.php
Pure PHP UUID generator
<?php
/**
* UUID class
*
* The following class generates VALID RFC 4122 COMPLIANT
* Universally Unique IDentifiers (UUID) version 3, 4 and 5.
*
* UUIDs generated validates using OSSP UUID Tool, and output
* for named-based UUIDs are exactly the same. This is a pure
* PHP implementation.
@mrsinguyen
mrsinguyen / README.md
Last active April 7, 2020 05:50
Elasticsearch in local

Run elasticsearch 5.6 in local with docker

Change your ES data folder /Users/mrsinguyen/go1/incubator/trial/es/data

$ docker-compose up
$ ES_URL='http://elastic:changeme@127.0.0.1:9200' phpunit
@mrsinguyen
mrsinguyen / Fix.md
Last active March 3, 2019 04:30
Fix an error `Linking /usr/local/Cellar/python/3.7.2_2... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks`
$ brew link python

Linking /usr/local/Cellar/python/3.7.2_2... Error: Permission denied @ dir_s_mkdir - /usr/local/Frameworks

$ sudo mkdir /usr/local/Frameworks
$ sudo chown $(whoami):admin /usr/local/Frameworks
$ brew link python
@mrsinguyen
mrsinguyen / gpp.md
Created January 2, 2019 08:07
Fix the error failed to sign the data
@mrsinguyen
mrsinguyen / gpg-import-and-export-instructions.md
Created January 2, 2019 03:24 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@mrsinguyen
mrsinguyen / crash.txt
Created December 25, 2018 02:46
Macbook Crash Log
Anonymous UUID: 662B149F-8C52-ED71-0620-4D10BF3E04DE
Tue Dec 25 09:45:22 2018
*** Panic Report ***
panic(cpu 0 caller 0xffffff800f4da1ed): Kernel trap at 0xffffff800f4b9ada, type 14=page fault, registers:
CR0: 0x0000000080010033, CR2: 0x00000eba9af14b80, CR3: 0x000000015bba7146, CR4: 0x00000000003626e0
RAX: 0x0000000000000001, RBX: 0xfffffeb6d5eb9ff0, RCX: 0xfffffef680000000, RDX: 0xfffffeb680000000
RSP: 0xffffff923d923ab0, RBP: 0xffffff923d923bc0, RSI: 0x0000000053af5700, RDI: 0x0000000000000000
R8: 0x0000000053af5700, R9: 0x0000000000000000, R10: 0x0000000000000000, R11: 0x0000000000000000
Green*
tick -> Yellow
Yellow
tick -> Red
Red
tick -> Green
@mrsinguyen
mrsinguyen / sco12.js
Created May 29, 2018 05:01
SCO12.js from ScoTube
/*
Source code created by Rustici Software, LLC is licensed under a
Creative Commons Attribution 3.0 United States License
(http://creativecommons.org/licenses/by/3.0/us/)
Want to make SCORM easy? See our solutions at http://www.scorm.com.
*/
var VO = null,
REPORT_SATISFACTION = !0;
@mrsinguyen
mrsinguyen / xss2.txt
Created April 30, 2018 05:01
XSS payload by RedBirdTeam
__ __ _____ _____
\ \ / // ____/ ____|
\ V /| (___| (___
> < \___ \\___ \ [RedBirdTeam]
/ . \ ____) |___) |
_____ __ / / \_\_____/_____/ _____ _____
| __ \ /\\ \ / / | / _ \ /\ | __ \ / ____| <script>alert(/Payloads XSS Filter Bypass List/)</script>
| |__) / \\ \_/ /| | | | | | / \ | | | | (___
| ___/ /\ \\ / | | | | | |/ /\ \ | | | |\___ \