A discussion detailing performance characteristics of columnar databases, and what situations they are better and what situations they are not.
https://news.ycombinator.com/item?id=3524437
My online tech scrapbook where I keep my notes in case I need to look them up later
Thursday, December 24, 2015
Sunday, December 20, 2015
Postgres Query for Current Running Queries
In short, query the pg_stat_activity table
Reference: http://chrismiles.info/systemsadmin/databases/articles/viewing-current-postgresql-queries/
Reference: http://chrismiles.info/systemsadmin/databases/articles/viewing-current-postgresql-queries/
Tuesday, December 15, 2015
JSch Error "com.jcraft.jsch.JSchException: reject HostKey" Even After Host Key Has Been Added
Usually when this error happens, all you need to do is to add the host key in a normal SSH session. However, this can also happen when the host key is in a format that JSch does not recognise or support e.g. I had a problem with a "ecdsa-sha2-nistp256" encoded host key.
To fix this I had to use the "ssh-keyscan -t rsa <hostname>" command (on the server) to obtain the host key in rsa format and then I manually added that to the "known_hosts" file.
Reference: http://anahorny.blogspot.sg/2013/05/solution-for-comjcraftjschjschexception.html
To fix this I had to use the "ssh-keyscan -t rsa <hostname>" command (on the server) to obtain the host key in rsa format and then I manually added that to the "known_hosts" file.
Reference: http://anahorny.blogspot.sg/2013/05/solution-for-comjcraftjschjschexception.html
Sunday, November 29, 2015
RHEL / CentOS Tomcat Missing Logs
Temporary workaround is to use "journalctl". Still trying to figure out the long-term solution.
References:
References:
Monday, November 16, 2015
Amazon Making EBS Volume Available for Use
Instructions here: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-using-volumes.html
Linux List Attached Drives
After adding a drive, it will not be visible to the OS until it is mounted and attached. To view it, use the "lsblk" command.
To check the filesystem status of the drive, use the "file -s /dev/<device>" command. If the response is "data". It means the drive is unformatted.
To check the filesystem status of the drive, use the "file -s /dev/<device>" command. If the response is "data". It means the drive is unformatted.
Thursday, October 29, 2015
SCP Stalling
In some situations, SCP can stall after just around 5-10 seconds, and it happens consistently. This can sometimes be solved by limiting the bandwidth SCP asks for.
Reference: http://askubuntu.com/questions/82984/why-does-scp-get-stalled-how-do-i-resolve-it
Reference: http://askubuntu.com/questions/82984/why-does-scp-get-stalled-how-do-i-resolve-it
Postgres: "invalid command \N" During Restore
This is sometimes a red herring, where the actual error is higher up on the restore script.
Reference: http://stackoverflow.com/questions/20427689/psql-invalid-command-n-while-restore-sql
Reference: http://stackoverflow.com/questions/20427689/psql-invalid-command-n-while-restore-sql
Tuesday, September 15, 2015
iOS Test Flight
To enable Test Flight:
- Upload a build to App Store (via XCode)
- Login to iTunes Connect, go to the "Pre-Release" section
- Enable Test Flight for the build
- Add users
References:
Tuesday, August 25, 2015
Installing AWS CLI Tools
Not all of AWS features are available in the web console. AWS CLI tools is necessary for calling some of the APIs.
Instructions here: https://github.com/aws/aws-cli
Instructions here: https://github.com/aws/aws-cli
AWS S3 Static Website HTTPS
While it is possible to host static websites on AWS S3, additional steps are necessary to enable SSL with your own custom domain.
In order to do that, you will need to create a CloudFront distribution (CloudFront is a CDN service).
The toughest part is uploading the SSL cert, which has to be done by command line API. Guide here: http://knightlab.northwestern.edu/2015/05/21/implementing-ssl-on-amazon-s3-static-websites/
More details on uploading SSL cert: http://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingServerCerts.html
Commands for uploading cert: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#UploadSignedCert
Note: remember to specify path
References:
In order to do that, you will need to create a CloudFront distribution (CloudFront is a CDN service).
The toughest part is uploading the SSL cert, which has to be done by command line API. Guide here: http://knightlab.northwestern.edu/2015/05/21/implementing-ssl-on-amazon-s3-static-websites/
More details on uploading SSL cert: http://docs.aws.amazon.com/IAM/latest/UserGuide/ManagingServerCerts.html
Commands for uploading cert: http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_server-certs_manage.html#UploadSignedCert
Note: remember to specify path
References:
Wednesday, June 17, 2015
C++: Iterating Through Vector of Pointers
(*iter)->someMethod()
Reference: http://stackoverflow.com/questions/23318875/iterating-through-a-vector-of-pointers
Reference: http://stackoverflow.com/questions/23318875/iterating-through-a-vector-of-pointers
Tuesday, June 16, 2015
Git: Amend Most Recent Commit Message
git commit --amend
Reference: http://stackoverflow.com/questions/179123/edit-an-incorrect-commit-message-in-git
Reference: http://stackoverflow.com/questions/179123/edit-an-incorrect-commit-message-in-git
Wednesday, June 3, 2015
Bash IO Redirection
">" for normal output. "2>" for error output.
Reference: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html
Reference: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html
Tuesday, May 5, 2015
Mac App Store Connection Failed
When trying to connect to the Mac App Store, there is the error message "Cannot connect to the app store. An internet connection is required."
There are many documented solutions for this, all of which will probably work for one person or another. However, the only method that worked for me was resetting my keychain: https://support.apple.com/en-sg/HT203192
Other solutions
There are many documented solutions for this, all of which will probably work for one person or another. However, the only method that worked for me was resetting my keychain: https://support.apple.com/en-sg/HT203192
Other solutions
Wednesday, April 22, 2015
C++: Find string within a string
There is a string::find function that is pretty straightforward to use. The key thing to note here is that when it's not found the return value is "string::npos".
Reference: http://www.cplusplus.com/reference/string/string/find/
Reference: http://www.cplusplus.com/reference/string/string/find/
C++: Constructing a std::string from std::vector
std::vector<char> is actually a vector of the characters that make up the string.
There is a constructor for std::string that can be used for this i.e. std::string s(v.begin(),v.end());
Reference: http://stackoverflow.com/questions/5115166/how-to-construct-a-stdstring-from-a-stdvectorchar
There is a constructor for std::string that can be used for this i.e. std::string s(v.begin(),v.end());
Reference: http://stackoverflow.com/questions/5115166/how-to-construct-a-stdstring-from-a-stdvectorchar
Monday, April 20, 2015
Coco2D-X: long Values on iOS
"long" isn't guaranteed to be 64 bits on iOS. To be sure that there won't be overflow, use int64_t.
Reference http://stackoverflow.com/questions/13604137/definition-of-int64-t
Reference http://stackoverflow.com/questions/13604137/definition-of-int64-t
Saturday, April 18, 2015
Subscribe to:
Posts (Atom)