Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors
| DELIMITER // | |
| CREATE FUNCTION BIN_TO_UUID(b BINARY(16)) | |
| RETURNS CHAR(36) | |
| BEGIN | |
| DECLARE hexStr CHAR(32); | |
| SET hexStr = HEX(b); | |
| RETURN LOWER(CONCAT( | |
| SUBSTR(hexStr, 1, 8), '-', | |
| SUBSTR(hexStr, 9, 4), '-', |
| # Generate a new pgp key: (better to use gpg2 instead of gpg in all below commands) | |
| gpg --gen-key | |
| # maybe you need some random work in your OS to generate a key. so run this command: `find ./* /home/username -type d | xargs grep some_random_string > /dev/null` | |
| # check current keys: | |
| gpg --list-secret-keys --keyid-format LONG | |
| # See your gpg public key: | |
| gpg --armor --export YOUR_KEY_ID | |
| # YOUR_KEY_ID is the hash in front of `sec` in previous command. (for example sec 4096R/234FAA343232333 => key id is: 234FAA343232333) |
| """How to gzip a string. | |
| This works for Python 3.2. For 3.1-, look at the original gist (under "Revisions") | |
| """ | |
| import gzip | |
| def gzip_str(string_: str) -> bytes: | |
| return gzip.compress(string_.encode()) |
| #!/bin/bash | |
| # Setup and enable auditd | |
| # MUST REBOOT AFTER SETUP | |
| # | |
| # FUNCTIONALITIES: | |
| # | |
| # * Auditing user TTY | |
| # aureport --tty | |
| # | |
| # * Auditing root commands (real uid) |
| ###[Q]Low question quality | |
| We will need much more information to give good recommendations here. Please take a look at [What is required for a question to contain "enough information"?](//softwarerecs.meta.stackexchange.com/q/336/185) Then please [edit] your question and see if you can incorporate some of these improvements. | |
| ###[Q]Requesting assets | |
| Please note this site is about recommending *software,* not assets or [resources](//softwarerecs.meta.stackexchange.com/q/2470/185) like [howtos](//softwarerecs.meta.stackexchange.com/q/882/185), [manuals/tutorials](//softwarerecs.meta.stackexchange.com/q/1258/185), [multi-media content](//softwarerecs.meta.stackexchange.com/q/935/185), [code fragments](//softwarerecs.meta.stackexchange.com/q/904/185), etc. If you're looking for data, our sister-site [Open Data](//opendata.stackexchange.com/help/on-topic) might be worth checking with. | |
| ###[Q]Asking for alternatives without explicit requirements | |
| We will need much more information to give good recommendations here – |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
| <?php | |
| // Source : http://css-tricks.com/snippets/php/sanitize-database-inputs/ | |
| // Function for stripping out malicious bits | |
| function cleanInput($input) { | |
| $search = array( | |
| '@<script[^>]*?>.*?</script>@si', // Strip out javascript | |
| '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags | |
| '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly |
| <?php | |
| function cleanInput($input) | |
| { | |
| $search = array( | |
| '@<script[^>]*?>.*?</script>@si', // Strip out javascript | |
| '@<[\/\!]*?[^<>]*?>@si', // Strip out HTML tags | |
| '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly | |
| '@<![\s\S]*?--[ \t\n\r]*>@' // Strip multi-line comments | |
| ); |
| <?php | |
| /* | |
| OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP) | |
| Author: _ck_ (with contributions by GK, stasilok) | |
| Version: 0.1.7 | |
| Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
| * revision history | |
| 0.1.7 2015-09-01 regex fix for PHP7 phpinfo | |
| 0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter |
Update: please note that I have since switched to using a set of bash scripts instead of poluting the Git repository with git svn.
Author: Kaspars Dambis
kaspars.net / @konstruktors