Skip to content

Instantly share code, notes, and snippets.

CODE IGNITER

USE PLURAL NAMES for Database TABLES, CONTROLLERS. USE SINGULAR NAMES for MODELS.

Each model is a class models/post.php --singular version

```
# vi: set ft=ruby :
Vagrant::Config.run do |config|
config.vm.box = "ubuntu14"
config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.forward_port 8000, 8000
config.vm.network :hostonly, "33.33.00.10"
# Used only in some rare cases
#config.vm.share_folder("vagrant-root", "/vagrant", ".", :extra => 'dmode=770,fmode=770', :nfs => true)
sudo /Library/StartupItems/VirtualBox/VirtualBox restart

###COMPILE LESS AND COPY

sudo grunt init 
sudo grunt ui

##SASS SYNTAX ###INSTALL SASS

sudo gem install sass

###CHECK SASS VERSION

sass -v

####CONVERT SASS FILES TO CSS

###SMACSS ####Categories

  • Base are the defaults. They are almost exclusively single element selectors but it could include attribute selectors, pseudo-class selectors, child selectors or sibling selectors. Essentially, a base style says that wherever this element is on the page, it should look like this
  • Layout divide the page into sections. Layouts hold one or more modules together

GIT

Turn a directory into a git project

git init

Check the status of your changes

git status

Add a file to the staging area

Se debe agregar el atributo maxlength para los siguientes inputs con los valores abajo definidos:

<input tabindex="-1" id="enrollPhraseInput" class="alphanumeric" type="text" placeholder="Frase de seguridad" maxlength="20">
<input tabindex="-1" maxlength="30" id="enrollAnswerInput" class="alphanumeric no-space uppercase-message" placeholder="Respuesta" type="password">
<input tabindex="-1" maxlength="30" id="enrollConfirmationInput" class="alphanumeric no-space uppercase-message" placeholder="Confirmación" type="password">

TYPESCRIPT

Installing typescript

npm install -g typescript

Transpile command

tsc ./filepath.ts

Watch file changes