This file contains 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
# connect | |
ssh centos@pubip_or_dns | |
ssh -i ~/.ssh/amazon/us-east-1 centos@pubip_or_dns | |
# add local key | |
paste ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys | |
# filezilla | |
https://forums.aws.amazon.com/thread.jspa?messageID=741338 but interactive |
This file contains 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
function doAsyncOnSubmit(form, asyncFn) { | |
const onSubmitFunction = async function(e) { | |
e.preventDefault() | |
form.off('submit', onSubmitFunction) | |
const doSubmit = await asyncFn() | |
if (doSubmit) { | |
form.submit() |
This file contains 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
Solved questions: | |
- how to send email after calling function? - postgres listen, notify | |
Unsolved questions: | |
- postgresql multidispatch functions? | |
- how to upload image and save it in db? (maybe schema stitching) | |
- rails like polymorphic relations? | |
- how to make vdare like role permissions? |
This file contains 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
export DB_NAME= | |
export DB_USER= | |
mysqldump -p -u "$DB_USER" "$DB_NAME" | gzip > "$HOME/$DB_NAME-backup-$(date +%F).sql.gz" |
This file contains 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
bcrypt examples in ruby and php |
This file contains 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
make_dhparam: | |
openssl dhparam -out backend/dhparams.pem 2048 | |
nixops_create: | |
nixops create '<base.nix>' | |
nixops_purge: | |
nixops destroy --all | |
nixops delete --all |
This file contains 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
$(".chosen-select-with-add-new").chosen({ | |
no_results_text: "Click Enter or Tab to add new option", | |
width: '100%' | |
}).parent().find('.chosen-container .search-field input[type=text]').keydown(function (evt) { | |
// get keycode | |
const stroke = evt.which != null ? evt.which : evt.keyCode; | |
// If enter or tab key | |
if (stroke === 9 || stroke === 13) { | |
const target = $(evt.target); | |
// get the list of current options |
ecommerce + news
- plain rails + jquery
- rectify for frontend (similar to https://github.com/BjornMelgaard/rails-bookstore)
- cocoon for rapid admin panel development
- stripe for payments
- gitlab ci for continuous integration
OlderNewer