Лекцията цели да представи бързо набралата популярност дистрибутирана система за source control. Ще инсталираме гит (на който няма). Ще демонстрираме с практически примери основните команди, както и с какво git се различава от централизираните системи (subversion, cvs, vss). Ако пък случайно има хора, които не са убедени в ползата от сорс контрол, ще поговорим защо това е необходимо. Носете си компютър.
Първа част има за цел да представи употребата на гит "еднолично" (сиреч, на един компютър). Във втора част, ако стане, ще говорим за това как да ползваме гит в екип.
Инсталация на (линукс, OS X, Windows)
Нашето първо repository
#Stay Standalone
A short script to prevent internal links to a "webapp" added to iPhone home screen to open in Safari instead of navigating internally.
############################################################## | |
# Upstream must have unique name and unique socket. # | |
# The socket must match what is in the app's unicorn.rb file # | |
############################################################## | |
upstream railsapp1_server { | |
server unix:/tmp/railsapp1.sock fail_timeout=0; | |
} | |
############################## | |
# Rewrite www to non-www # |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
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.
# rails generate migration change_to_utf8mb_encoding | |
class ChangeToUtf8mbEncoding < ActiveRecord::Migration | |
# def execute(text) | |
# puts text | |
# end | |
def db | |
ActiveRecord::Base.connection | |
end |
/* | |
sample usage: | |
var path = getDomPath(element); | |
console.log(path.join(' > ')); | |
output: | |
body > section:eq(0) > div:eq(3) > section#content > section#firehose > div#firehoselist > article#firehose-46813651 > header > h2 > span#title-46813651 | |
taken from: | |
http://stackoverflow.com/questions/5728558/get-the-dom-path-of-the-clicked-a |