echo "service iptables restart"| at now + 2 min
iptables --flush
### Drop invalid packets ###
iptables -t mangle -A PREROUTING -m conntrack --ctstate INVALID -j DROP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <sys/types.h> | |
| #include <sys/mman.h> | |
| #include <sys/stat.h> | |
| #include <openssl/ssl.h> | |
| #include <openssl/err.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| du -cks * | sort -rn | head -11 | |
| # Usually set this up in my bash profile as an alias: | |
| # alias ducks='du -cks * | sort -rn | head -11' | |
| # Because it is fun to type ducks on the command line. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| This gives a overview: | |
| List of Domain operators: ! (Not), | (Or), & (And) | |
| List of Term operators: '=', '!=', '<=', '<', '>', '>=', '=?', '=like', '=ilike', 'like', 'not like', 'ilike', 'not ilike', 'in', 'not in', 'child_of' | |
| Usage: | |
| Input records: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Const ForReading = 1 | |
| Const ForWriting = 2 | |
| Set objFSO = CreateObject("Scripting.FileSystemObject") | |
| Set objFolder = objFSO.GetFolder("D:\ExampleFolder") | |
| Set colFiles = objFolder.Files | |
| For Each objFile in colFiles | |
| Set objFiles = objFSO.OpenTextFile("D:\ExampleFolder\" & objFile.Name, ForReading) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| JSON.parse(('{"' + $('form').serialize() + '"}').replace(/=+/gi,'":"').replace(/&+/gi,'","')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public List<T> getList(long first, long last, String selectSql) throws SQLException { | |
| List<T> list = new ArrayList<T>(); | |
| String query = "select * from (select rownum rn,sq1.* from " + | |
| "("+selectSql+") sq1)" + | |
| " sq2 where sq2.rn>=" + first + " and sq2.rn<=" + last; | |
| Statement stmt = this.conn.createStatement(); | |
| ResultSet rs = stmt.executeQuery(query); | |
| while (rs.next()) | |
| list.add(convert(conn, rs)); | |
| rs.close(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| select * from | |
| ( select a.*, ROWNUM rnum from | |
| ( <your_query_goes_here, with order by> ) a | |
| where ROWNUM <= :MAX_ROW_TO_FETCH ) | |
| where rnum >= :MIN_ROW_TO_FETCH; |