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
| message.sentByString = arc4random_uniform(2) == 0 ? [LGChatMessage SentByOpponentString] : [LGChatMessage SentByUserString]; |
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
| list the pids | |
| lsof -i:3000 | |
| ruby 28479 username 10u IPv4 0x50e2b32487dea405 0t0 TCP *:hbci (LISTEN) | |
| kill the server | |
| kill -9 28479 |
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
| General | |
| \copyright show PostgreSQL usage and distribution terms | |
| \g [FILE] or ; execute query (and send results to file or |pipe) | |
| \gset [PREFIX] execute query and store results in psql variables | |
| \h [NAME] help on syntax of SQL commands, * for all commands | |
| \q quit psql | |
| \watch [SEC] execute query every SEC seconds | |
| Query Buffer | |
| \e [FILE] [LINE] edit the query buffer (or file) with external editor |
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
| pp(JSON.parse(object.to_json)) |
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
| AudioBuffer<float> buffer; | |
| buffer.setSize(2, 10000); | |
| // do something with buffer | |
| File file("D:/test.wav"); | |
| file.deleteFile(); | |
| WavAudioFormat format; | |
| std::unique_ptr<AudioFormatWriter> writer; |
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
| from https://blogs.tensult.com/2018/08/06/copy-s3-bucket-objects-across-aws-accounts/ | |
| In this blog, I am going to explain about, how to transfer S3 objects from one AWS account to another. | |
| Prerequisites | |
| Two AWS accounts(One for source S3 bucket and another for destination S3 bucket) | |
| Create an IAM user in destination AWS account (see this doc to create IAM user for AWS account). | |
| Configure AWS CLI in local machine with previously created IAM user credentials (see this doc to configure AWS CLI). | |
| Step 1: Get The 12 Digit Destination AWS Account Number | |
| Sign in to destination AWS account. Go to Support → Support center and copy account number from there. |
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
| # WEB2 Secure Random ID generator | |
| # app/models/concerns/hex_id_methods.rb | |
| # include HexIdMethods in any model that uses :hex_id | |
| module HexIdMethods | |
| extend ActiveSupport::Concern | |
| # Create a safe character set: a-k, m-z, 0, 2-9 (no l, 1) - 34 characters | |
| SAFE_CHARS = (('a'..'k').to_a + ('m'..'z').to_a + ['0'] + ('2'..'9').to_a).freeze | |
| MAX_RETRIES = 3 |
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
| git branch dev main && git push -u origin dev | |
| git branch jg main && git push -u origin jg | |
| git branch qa main && git push -u origin qa | |
| git branch prod main && git push -u origin prod |
OlderNewer