Rails 3.0 introduced support for routing constrained by subdomains.
A subdomain can be specified explicitly, like this:
match '/' => 'home#index', :constraints => { :subdomain => 'www' }
1xx Informational | |
100 :continue | |
101 :switching_protocols | |
102 :processing | |
2xx Success | |
200 :ok | |
201 :created | |
202 :accepted | |
203 :non_authoritative_information |
Below are many examples of function hoisting behavior in JavaScript. Ones marked as works
successfuly print 'hi!' without errors.
To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js
(I may be using incorrect terms below, please forgive me)
Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.
Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.
As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.
Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.
#!/bin/bash | |
# Update system | |
echo "Updating system and installing new packages" | |
sudo apt-get update | |
sudo apt-get upgrade | |
# Install dependencies and utilities | |
echo "Install utilities" | |
sudo apt-get -y install rar \ |
#!/bin/bash | |
find /path/to/folder -depth -name ".DS_Store" -exec rm {} \; | |
find /path/to/folder -depth -name "._*" -exec rm -Rf {} \; |
#!/usr/bin/expect -f | |
spawn ssh-add /home/[USER]/.ssh/gh_rsa | |
expect "Enter passphrase for /home/[USER]/.ssh/gh_rsa:" | |
send "[PUT-PASSPHRASE HERE]\n"; | |
interact | |
## Call with command | |
## expect gh_automatic_login.sh | |
#Found in: |
# Change these | |
set :repo_url, '[ENTER YOUR GIT REPO URL HERE]' | |
set :user, 'macsa' | |
set :branch, 'test' | |
set :application, 'staging' | |
set :puma_threads, [4, 16] | |
set :puma_workers, 0 |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
# END WordPress |
UPDATE wp_options | |
SET option_value = 'http://yourdomain.com/' | |
WHERE option_name = 'siteurl'; | |
UPDATE wp_options | |
SET option_value = 'http://yourdomain.com/' | |
WHERE option_name = 'home'; | |
/* M谩s informaci贸n: | |
https://otroespacioblog.wordpress.com/2014/12/10/la-solucion-definitiva-al-error-de-las-cookies-en-wordpress |