Skip to content

Instantly share code, notes, and snippets.

View duongkai's full-sized avatar

Pham Tung Duong duongkai

View GitHub Profile
I have marked with a * those which I think are absolutely essential
Items for each section are sorted by oldest to newest. Come back soon for more!
BASH
* In bash, 'ctrl-r' searches your command history as you type
- Input from the commandline as if it were a file by replacing
'command < file.in' with 'command <<< "some input text"'
- '^' is a sed-like operator to replace chars from last command
'ls docs; ^docs^web^' is equal to 'ls web'. The second argument can be empty.
* '!!:n' selects the nth argument of the last command, and '!$' the last arg
@duongkai
duongkai / Hackback
Created August 14, 2014 04:11
Hackback
_ _ _ ____ _ _
| | | | __ _ ___| | __ | __ ) __ _ ___| | _| |
| |_| |/ _` |/ __| |/ / | _ \ / _` |/ __| |/ / |
| _ | (_| | (__| < | |_) | (_| | (__| <|_|
|_| |_|\__,_|\___|_|\_\ |____/ \__,_|\___|_|\_(_)
A DIY Guide for those without the patience to wait for whistleblowers
--[ 1 ]-- Introduction
@duongkai
duongkai / practice 5.php
Created October 3, 2015 00:17
practice 5
<title>CrypotCrypotCrypot</title>
<pre><h3>
<?php
$FLAG = 'XXXXXXXXXXXXXXX_censored_XXXXXXXXXXXXX';
$LENGTH_FLAG = strlen($FLAG);
$KEY = empty($_GET['key']) ? "TEST" : $_GET['key'];
$sha1_all = hash("sha512","\x00",true); //init
echo "Your KEY : <font color=Green>$KEY</font>\n";
for($i=0; $i < $LENGTH_FLAG; $i++){
<?php
/**
* Name: CodeIgniter RSA library
* Author: Dirk de Man
* dirk_de_man at yahoo . com
* @dirktheman
*
* Created: 05.10.2012
*
* Description: CodeIgniter RSA library for encrypting and decrypting messages
Vì cuộc sống Việt
https://www.youtube.com/watch?v=_OGr1MB9bVs
https://www.youtube.com/watch?v=RNbh2exZHdY
Mái ấm gia đình
https://www.youtube.com/watch?v=0d5hk_aKfLg
Vị ngon gắn kết
https://www.youtube.com/watch?v=37lQWkD4dfc
@duongkai
duongkai / System Design.md
Created April 20, 2016 06:51 — forked from vasanthk/System Design.md
System Design Cheatsheet

#System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

##Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@duongkai
duongkai / lecture_note.md
Last active July 30, 2018 05:57
CISSP lectures note

Day 2

Chapter 2. Asset

Change management

  • Change Management

    • Create Change Request
    • Submit to CAB (Change advisory board)
    • Review the CR and impact
    • Create rollback plan
  • Hacking lifecycle

@duongkai
duongkai / note.md
Last active December 20, 2016 13:18
Surface linux installation
@duongkai
duongkai / iops.txt
Created February 13, 2017 17:37
IOPS for each RAID
1x 256GB a single drive 232 gigabytes ( w= 441MB/s , rw=224MB/s , r= 506MB/s )
2x 256GB raid0 striped 464 gigabytes ( w= 933MB/s , rw=457MB/s , r=1020MB/s )
2x 256GB raid1 mirror 232 terabytes ( w= 430MB/s , rw=300MB/s , r= 990MB/s )
3x 256GB raid5, raidz1 466 gigabytes ( w= 751MB/s , rw=485MB/s , r=1427MB/s )
4x 256GB raid6, raidz2 462 gigabytes ( w= 565MB/s , rw=442MB/s , r=1925MB/s )
@duongkai
duongkai / modsecurity.conf
Last active January 15, 2018 01:51
Mode Security Configuration
# -- Rule engine initialization ----------------------------------------------
# Enable ModSecurity, attaching it to every transaction. Use detection
# only to start with, because that minimises the chances of post-installation
# disruption.
#
SecRuleEngine DetectionOnly
# -- Request body handling ---------------------------------------------------