Because somehow I always end up trolling the interwebs looking for a reference for these.
| Symbol | Code | Entity Name |
|---|
Because somehow I always end up trolling the interwebs looking for a reference for these.
| Symbol | Code | Entity Name |
|---|
| guard 'livereload' do | |
| watch(%r{content/pages(/.+)\.(mdown|textile|haml)}) { |match| match[1] } | |
| watch(%r{public(/.+\.(jpe?g|js|png))}) { |match| match[1] } | |
| watch(%r{views/.+\.haml}) | |
| watch(%r{views/.+\.html.erb}) | |
| watch(%r{assets/stylesheets/(.+)\.s[ac]ss}) do |match| | |
| if match[1] =~ /(mixins|variables)/ | |
| ["/css/master.css", "/css/layout.css"] | |
| else | |
| "/css/#{match[1]}.css" |
| /* Smartphones (portrait and landscape) ----------- */ | |
| @media only screen | |
| and (min-device-width : 320px) | |
| and (max-device-width : 480px) { | |
| /* Styles */ | |
| } | |
| /* Smartphones (landscape) ----------- */ | |
| @media only screen | |
| and (min-width : 321px) { |
| (function activarClase () { | |
| aObj = document.getElementById('nav').getElementsByTagName('a'); | |
| for(i=0; i< aObj.length; i++) { if (document.location.href.indexOf( aObj[i].href )>=0 ) { aObj[i].parentNode.className = 'mini-bloque activo'; } } | |
| })(); |
| $('.menu').bind('click',function(event){ | |
| var $anchor = $(this); | |
| $('html, body') | |
| .stop() //stop the animation | |
| .animate({ | |
| scrollTop: //scrollTop setea la barra de scroll | |
| $($anchor.attr('href')) | |
| .offset() | |
| .top |
| createuser nombre | |
| createdb -Opostre -Eutf8 postre_development |
| Startup/Shutdown | |
| Next, as the instructions suggest you can set Postgres to start and stop automatically when your mac starts. Run these three commands to have this happen (Postgres will start when you run the last command so there is no need to manually start it if you do this): | |
| mkdir -p ~/Library/LaunchAgents | |
| cp /usr/local/Cellar/postgresql/9.0.4/org.postgresql.postgres.plist ~/Library/LaunchAgents/ | |
| launchctl load -w ~/Library/LaunchAgents/org.postgresql.postgres.plist | |
| I’ve done this because I use Postgres for all my personal projects. If you’re just experimenting and want to control when it is running you can start and stop Postgres with these commands (perhaps with a shell alias). EDIT: Someone on the Hacker News thread suggested Lunchy for managing launchctl stuff, I’ve not tried it, but it looks useful. | |
| Start Postgres: |
| <script type="text/javascript"> | |
| function calcular(a,b) { | |
| imc = (a / (b*b)); | |
| document.getElementById("resultado").innerHTML = Math.round(imc*10)/10; | |
| if (imc<=19.90) { | |
| document.getElementById("diagnostico").innerHTML= " Desnutrición"; | |
| } | |
| else if (imc>19.90 && imc<=25) { | |
| document.getElementById("diagnostico").innerHTML= " Peso Normal"; | |
| } |