- При регистрации юзер вводит некий пароль
- Генерим случайную соль индивилуально для каждого юзера
- Создаем хеш на основе введенного юзером пароля и соли
- Записываем хеш(не пароль) в БД + соль в отдельном филде
- Юзер вводит в поле авторизации некий пароль
| #!/usr/bin/env bash | |
| # Скрипт по загрузке публичных файлов с Облака mail.ru. Поддерживается докачка. | |
| # v1.0.5 от 2022-05-30 | |
| # | |
| # ЕСЛИ СКРИПТ НЕ РАБОТАЕТ | |
| # | |
| # 1. Убедитесь, что файл доступен публично. Возможна загрузка только публичных файлов. | |
| # 2. Mail.ru время от времени меняет внутрянку, не очень сильно, но требуется адаптация скрипта. | |
| # Если скрипт не работает, просьба сделать работающий форк и скинуть ссылку в комментарии. |
| def instacheck(name) | |
| unless /[a-z0-9._]{,30}/.match(name) | |
| return false | |
| end | |
| if /\.\./.match(name) | |
| return false | |
| end |
In the below keyboard shortcuts, I use the capital letters for reading clarity but this does not imply shift, if shift is needed, I will say shift. So ⌘ + D does not mean hold shift. ⌘ + Shift + D does of course.
| Function | Shortcut |
|---|---|
| New Tab | ⌘ + T |
| Close Tab or Window | ⌘ + W (same as many mac apps) |
| Go to Tab | ⌘ + Number Key (ie: ⌘2 is 2nd tab) |
| Go to Split Pane by Direction | ⌘ + Option + Arrow Key |
Outdated note: the process is a lot easier now: after you brew install postgresql you can initialize or stop the daemon with these commands: brew services start postgresql or brew services stop postgresql.
new out put may look like
To have launchd start postgresql now and restart at login:
brew services start postgresql
Or, if you don't want/need a background service you can just run:
pg_ctl -D /usr/local/var/postgres start
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |
| #how to specify an ssh key to use when cloning a repo in Mac | |
| ssh-agent bash -c 'ssh-add /Users/UR_USERNAME/.ssh/UR_PRIVATE_KEY; git clone git@DAS_GIT_URL' | |
| function Selector_Cache() { | |
| var collection = {}; | |
| function get_from_cache( selector, reset ) { | |
| if ( undefined === collection[ selector ] || true === reset ) { | |
| collection[ selector ] = jQuery( selector ); | |
| } | |
| return collection[ selector ]; | |
| } |