This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** Creating and Deploying using Git, Github and PHP **/ | |
Prerequisites: | |
Server: SSH Acces, PHP, Git | |
Local: SSH, Git | |
0.Create a PHP file in your project called "deploy.php" with this content: /*<?php `git pull`;*/ | |
1. Create Your Github Repo | |
2. Go to your project folder and initiate a git repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In order to get Rails to play well with Backbone you need to tell Rails not to return the root in the JSON return. This is accomplished by adding the following line to an initializer. | |
ActiveRecord::Base.include_root_in_json = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***** Selector Hacks ******/ | |
/* IE6 and below */ | |
* html #uno { color: red } | |
/* IE7 */ | |
*:first-child+html #dos { color: red } | |
/* IE7, FF, Saf, Opera */ | |
html>body #tres { color: red } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.box { | |
counter-increment: boxes; | |
} | |
The counter-increment property can accept either one or two properties. The first is an id that you will later use to reference this specific counter. You may also pass a second parameter that refers to the increment. For example, instead of 1, 2, 3, 4, you could switch to 5, 10, 15, 20 by applying: counter-increment: boxes 5. | |
This code will now store a unique number for each element that has a class of box. But of course, we want to get this number on the page. Hopefully, we’ll, at some point in the future, be able to use the content property within standard selectors, but not quite yet. Instead, we’ll use pseudo elements to apply the content. | |
.box:after { | |
content: counter(boxes); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install mysql2 -- --with-mysql-include=C:\xampp\mysql\include --with-mysql-lib=C:\xampp\mysql\lib\opt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title></title> | |
<style> | |
figure { background: #e3e3e3; display: block; float: left;} | |
#zoom { | |
width: 200px; | |
-webkit-transition: width 1s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem install mysql2 -- --with-mysql-include=C:\xampp\mysql\include --with-mysql-lib=C:\xampp\mysql\lib\opt | |
At the time of building this gem, the necessary DLL files where available | |
in the following download: | |
http://dev.mysql.com/get/Downloads/Connector-C/mysql-connector-c-noinstall-6.0.2-win32.zip/from/pick | |
And put lib\libmysql.dll file in your Ruby bin directory, for example | |
C:\Ruby\bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My simple work around was going to config/database.yml file and changing the host to use 127.0.0.1 instead of localhost as follows. | |
development: | |
adapter: mysql2 | |
encoding: utf8 | |
reconnect: false | |
database: quiz_development | |
pool: 5 | |
username: root | |
password: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
textarea { | |
-webkit-box-sizing: border-box; | |
-moz-box-sizing: border-box; | |
box-sizing: border-box; | |
width: 100%; | |
} | |
Setting the box-sizing to border-box allows the textarea to respect its parent container's padding and border, recalculating what 100% actually means. If the box-sizing were content-box, the textarea would continue to stretch outside the parent container as it would have before. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
target ÷ context = result | |
If we assume the body’s default type size to be 16px, we can plug each desired font-size value into this formula. So to properly match our header to the comp, we divide the target value (24px) by the font-size of its container (16px): | |
24 ÷ 16 = 1.5 | |
So the header is 1.5 times the default body size, or 1.5em, which we can plug directly into our stylesheet. | |
h1 { | |
font-family: Georgia, serif; | |
font-size: 1.5em; /* 24px / 16px = 1.5em */ | |
} |
OlderNewer