I hereby claim:
- I am bsormagec on github.
- I am sormagec (https://keybase.io/sormagec) on keybase.
- I have a public key ASByYYxvWV5PXr1yc5u-qFon0VQ_3xcgGrPbyPpYWDA4iAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| /** | |
| * simple method to encrypt or decrypt a plain text string | |
| * initialization vector(IV) has to be the same when encrypting and decrypting | |
| * | |
| * @param string $action: can be 'encrypt' or 'decrypt' | |
| * @param string $string: string to encrypt or decrypt | |
| * | |
| * @return string | |
| */ |
| <?php | |
| /** | |
| * Simple PHP Encryption functions | |
| * | |
| * Attempts to be as secure as possible given: | |
| * | |
| * - Key can be any string | |
| * - No knowledge of encryption is required | |
| * - Only key and raw/encrypted string is needed at each end |
Update: There is a more secure version available. Details
<?php
$plaintext = 'My secret message 1234';Dump your database:
mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root databasename
Convert the dump to Postgres syntax using https://github.com/lanyrd/mysql-postgresql-converter:
wget https://raw.github.com/lanyrd/mysql-postgresql-converter/master/db_converter.py
| #!/usr/bin/perl -w | |
| ################################################################################ | |
| # memcache-top.pl | |
| # | |
| # "top" for memcache - watch the traffic and other stats in real-time. Yoikes. | |
| # | |
| # NOTES: | |
| # | |
| # If Getopt::Long is installed: |
This code snippet is for exporting passwords stored in Google Chrome for use in 1Password. It generates a 1Password compatiable CSV file.
NOTE: Your password are exported as plain text. Take proper precautions when storing the file and use a secure deletion tool.
To export your passwords follow these steps:
[Cmd] + [Option] + J / Windows or Linux: [Ctrl] + [Shift] + J`)| server { | |
| listen 80; | |
| server_name localhost; | |
| root /Users/YOUR_USERNAME/Sites; | |
| access_log /Library/Logs/default.access.log main; | |
| location / { | |
| include /usr/local/etc/nginx/conf.d/php-fpm; | |
| } |
| # Purge all Varnish cache | |
| varnishadm "ban req.url ~ /" |