Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
class Klass | |
def initialize(number) | |
self.number = number | |
end | |
attr_reader :number | |
private | |
attr_writer :number |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-14-04
https://sysadmincasts.com/episodes/43-19-minutes-with-ansible-part-1-4
https://sysadmincasts.com/episodes/45-learning-ansible-with-vagrant-part-2-4
https://sysadmincasts.com/episodes/46-configuration-management-with-ansible-part-3-4
https://medium.com/@perwagnernielsen/ansible-tutorial-part-2-installing-packages-41d3ab28337d
# config/environments/development.rb | |
... | |
if defined? BetterErrors | |
# Force all developers on this project to use VS Code, even if they prefer something else. | |
BetterErrors.editor = proc { |file, line| "subl://#{file}:#{line}"} | |
end |
# config/initializers/clear_dev_logs.rb | |
# This snippet simply clears your logs when they are too large. | |
# Large logs for development are usually something you don't want. | |
# Every time you run rails server or rails console it checks the size | |
# of your development logfile and truncates it. | |
if Rails.env.development? | |
MAX_LOG_SIZE = 1.megabytes | |
DEV_LOG_FILE = File.join(Rails.root, 'log', 'development.log') |
# after gems | |
bundle exec shelly add -o <name organitation> | |
# Edit cloudfile | |
# push edit | |
git push shelly master | |
# import production db | |
shelly backup import postgresql dump.sql --reset |
touch ~/.gitconfig | |
cat >~/.gitconfig << EOL | |
[color] | |
diff = auto | |
status = auto | |
branch = auto | |
ui = true | |
[color "status"] | |
changed = yellow |
# only folder b1 under configuration | |
# all others files are program files | |
# | |
# create and use a alias bash gitconf | |
mkdir PROG | |
echo content >> PROG/readme | |
mkdir PROG/FOLDER_A | |
echo content >> PROG/FOLDER_A/filea-1 |
# Copy and paste this to the rails console to test your email settings | |
# Rails 3.2 | |
class TestMailer < ActionMailer::Base | |
default :from => "me@mysite.com" | |
def welcome_email | |
mail(:to => "other@elsewhere.com", :subject => "Test mail", :body => "Test mail body") | |
end |