sendmail -bp
or
mailq
to check whats in the sendmail queue
| namespace :associate_users do | |
| desc "Update users external builder" do | |
| @users = User.where(:external_builder_id => nil) | |
| @users.each do |user| | |
| #associate ExternalBuilder with User | |
| unless user.lbp_number.blank? | |
| @builder = ExternalBuilder.where(:lbp_number => user.lbp_number.gsub("BP", "").to_i) | |
| if !@builder.blank? | |
| u.update_column(:external_builder_id, @builder) | |
| end |
| # gem "prawn", "0.8.4" | |
| # Sometime there is no enough space for the last table row when it reaches the end of page | |
| Prawn::Document.generate("text_group_overflow_question.pdf") do |pdf| | |
| add_page_break_if_overflow(pdf) do |pdf| | |
| # generating table here | |
| # ... | |
| end | |
| end |
| gems = File.open(".gems") | |
| gems.each do |gem| | |
| puts "Installing #{gem}" | |
| `gem install #{gem}` | |
| end |
| /* | |
| * Scaffolding | |
| * Basic and global styles for generating a grid system, structural layout, and page templates | |
| * ------------------------------------------------------------------------------------------- */ | |
| .container | |
| Sets a width of 940px which also centres the content (clears floated elements before/after) | |
| .container-fluid | |
| Sets a minimum width of 940px (clears floated elements before/after) |
| #!/bin/sh | |
| tables=$(psql database_name -A -t -c "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public';") | |
| for table in $tables | |
| do | |
| echo "Granting select to username on $table" | |
| psql database_name -c "GRANT SELECT ON $table to username;" | |
| done |
Atler owner of db
ALTER DATABASE name OWNER TO new_owner;
Create the user
postgres@hostname:~$ createuser
Enter name of role to add: username
| # Hey @deadmau5, @nz_cub3y here. Wrote this for you. | |
| # | |
| # Running instructions | |
| # ruby come_to_nz_deadmau5.rb | |
| # You can stop the process from running any time using Ctrl+C | |
| # Tour setup | |
| class Tour | |
| attr_accessor :year, :locations |
| # Add Swap | |
| First check to see if you have swap enabled first `sudo swapon -s`, if not then: | |
| ``` | |
| sudo dd if=/dev/zero of=/swapfile bs=1024 count=256k | |
| sudo mkswap /swapfile | |
| sudo swapon /swapfile | |
| echo "/swapfile none swap sw 0 0 " | sudo tee --append /etc/fstab | |
| echo 10 | sudo tee /proc/sys/vm/swappiness |