$ rails g model User
belongs_to
has_one
# I want a list of 6 non-administrators who are not the | |
# current user only if someone is logged in. Otherwise, | |
# don't check current_user's id. | |
# instead of this: | |
if user_signed_in? | |
@other_users = User.non_admin.limit(6).where("name IS NOT NULL") | |
else | |
@other_users = User.non_admin.limit(6).where(['id != ?', @user.id]).where("name IS NOT NULL") |
#!/bin/sh | |
for file in *.flac; do flac -cd "$file" | lame -h -b 320 - "${file%.flac}.mp3"; done |
This guide will walk you through adding some extra features such as the ability to underline your text, or enhance your content by adding superscripts or subscripts for annotations or Math equations.
Prerequisites: Instruction guide assumes that you have created a Rails application and installed ActionText.
const request = require('request') | |
const msgpack = require("msgpack-lite"); | |
var packedData = msgpack.encode({ | |
"str" : "Something", | |
"number" : 4.0, | |
"arr": ["one","two"], | |
"nClass": { | |
"doubleNumber" : 35.0, | |
"nums" : [34,23] |