https://help.ubuntu.com/community/Fstab
sudo lsblk # list block devices
sudo blkid # Get block device UUID
sudo mount -a # will try to mount everything and throw errors if fstab is screwed up.
| group :development do | |
| gem 'railroady' | |
| gem 'quiet_assets' | |
| gem 'letter_opener' | |
| gem 'pry' | |
| gem 'awesome_print' | |
| end |
| class CreateListProductInteractions < ActiveRecord::Migration | |
| def change | |
| create_table :list_product_interactions do |t| | |
| t.integer :votes_up, default: 0 | |
| t.integer :votes_down, default: 0 | |
| t.integer :votes_activity, default: 0 | |
| t.integer :votes_total, default: 0 | |
| t.integer :list_id | |
| t.integer :product_id |
| // Coffee script | |
| books = [1..25] | |
| data = (book for book in books) | |
| console.log data | |
| // Generated Javascript | |
| (function() { | |
| var book, books, data, _i, _results; | |
| books = (function() { |
| require "rake/testtask" | |
| Rake::TestTask.new(:test) do |t| | |
| t.libs << "spec" | |
| t.pattern = "spec/**/*_spec.rb" | |
| end | |
| Rake::TestTask.new(:webkit) do |t| | |
| t.libs << "spec_webkit" | |
| t.pattern = "spec_webkit/**/*_spec.rb" |
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "compress/gzip" | |
| "encoding/xml" | |
| ) | |
https://help.ubuntu.com/community/Fstab
sudo lsblk # list block devices
sudo blkid # Get block device UUID
sudo mount -a # will try to mount everything and throw errors if fstab is screwed up.
| disable_ddl_transaction! | |
| def up | |
| add_column :users, :processed, :boolean | |
| change_column :users, :processed, :boolean, default: false | |
| execute 'update users set processed = false where processed is null' | |
| add_index :users, :processed, where: 'processed = false', algorithm: :concurrently | |
| end |
| sudo cat /proc/[pid]/environ | tr '\0' '\n' |
| # Look into | |
| # Explicitly define PATH at the top of your crontab file: | |
| PATH=/Users/deployer/.rbenv/shims:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin | |
| Or | |
| export PATH=~/.rbenv/shims:~/.rbenv/bin:"$PATH" | |
| Ubuntu 15.04 | |
| sudo apt-get install numactl | |
| # Open systemd file | |
| # find /etc/systemd/ | grep -i mongo | |
| /etc/systemd/system/multi-user.target.wants/mongod.service | |
| [Unit] | |
| Description=An object/document-oriented database |