nil
and false
are the only objects evaluated as false.
!!nil == false # true
!!0 == false # false
false.nil? # false
For webcam input, freeze and convert to img.
Using a link you can open whatsapp on mobile and have a predefined text to be sent to 1 or more contacts. If it is 1, it will open the conversation and the text will be already typed but it can be edited. In case of selecting multiple contacts, the message will be sent individualy without being able to edit.
$19/month
#Vagrant
Creates and downloads if necesary a vm with Ubuntu 12.04 LTS
vagrant init hashicorp/precise32
Runs the VM of current directory
vagrant up
class Sendgrid | |
class << self | |
@@LISTS = { | |
newsletter: ENV.fetch('SENDGRID_LIST_NEWSLETTER_ID'), | |
}.with_indifferent_access | |
def add_mail_to_list(list_name, email, args={}) | |
Rails.logger.info("SubscriptionWorker: Adding '#{email}' to sengrid list '#{list_name}'") | |
contact_name = args[:contact_name] || '' | |
subscribe_to_sendgrid(list_name, email, contact_name) |
#!/usr/bin/env bash | |
# Things to do after install ArchLinux (2012.12.01) | |
pacman --noconfirm -S sudo | |
# Enabled archlinuxfr repo | |
arch=$(uname -m) | |
sudo cp /etc/pacman.conf /etc/pacman.conf.bak | |
echo "" >> /etc/pacman.conf | |
echo "[archlinuxfr]" >> /etc/pacman.conf |
module TicTacToe | |
class Game | |
# X starts | |
# Previous winner starts new game | |
# or which turn would have followed if draw | |
attr_reader :players, :grid, :turn | |
def initialize(args={}) | |
@players = [] |
# Ruby version has to be 1.9.3 or above, by default is 2.0 | |
... | |
ruby '2.2.0' | |
# Heroku uses only supports Postgresql | |
# Check database.yml to make sure production is using postgresql | |
gem 'pg' #, group: :production # in case of using another db for development | |
gem 'rails', '4.2.0' | |
gem 'unicorn' | |
gem 'rails_12factor', group: :production |