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
# | |
# systemd unit file for CentOS 7, Ubuntu 15.04 | |
# | |
# Customize this file based on your bundler location, app directory, etc. | |
# Put this in /usr/lib/systemd/system (CentOS) or /lib/systemd/system (Ubuntu). | |
# Run: | |
# - systemctl enable sidekiq | |
# - systemctl {start,stop,restart} sidekiq | |
# | |
# This file corresponds to a single Sidekiq process. Add multiple copies |
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
https://gorails.com/deploy/ubuntu/20.04 | |
https://gorails.com/setup/osx/11-big-sur | |
After clone repo just install ruby, nodejs and database | |
bundle exec rails webpacker:install | |
rails assets:precompile RAILS_ENV=production | |
RAILS_ENV=production rails db:migrate | |
https://chienkira.github.io/blog/posts/h%C6%B0%E1%BB%9Bng-d%E1%BA%ABn-c%C3%A0i-%C4%91%E1%BA%B7t-server-rails-puma-nginx/ | |
https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-puma-and-nginx-on-ubuntu-14-04 |
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
//lo sauer, 2011; lsauer.com | |
/** | |
* I saw this thread: http://stackoverflow.com/questions/840781/easiest-way-to-find-duplicate-values-in-a-javascript-array | |
* The solutions above lacked the elegance that can be done a with map-reduce-like operations | |
* Since this implementation works with native functions, the speed is in most circumstances faster | |
* than any solution using scripted-logic | |
* Additionally, I needed to quickly filter duplicate url-entries for: http://lsauer.github.com/chrome-session-restore/ | |
*/ | |
//copy and paste: without error handling | |
Array.prototype.unique = function(){return this.sort().filter( function(v,i,o){if(i>=0 && v!==o[i-1]) return v;});} |
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
$ -> | |
$("a[data-background-color]").click(e) -> | |
e.preventDefault() | |
backgroundColor = $(this).data("background-color") | |
textColor = $(this).data("text-color") | |
paintIt(this, backgroundColor, textColor) |