###IAB1 Arts & Entertainment
IAB1-1 Books & Literature
IAB1-2 Celebrity Fan/Gossip
IAB1-3 Fine Art
IAB1-4 Humor
IAB1-5 Movies
IAB1-6 Music
IAB1-7 Television
###IAB2 Automotive
| #The MIT License (MIT) | |
| # Copyright (c) 2012 Jordan Wright <jordan-wright.github.io> | |
| # Permission is hereby granted, free of charge, to any person obtaining a copy | |
| # of this software and associated documentation files (the "Software"), to deal | |
| # in the Software without restriction, including without limitation the rights | |
| # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| # copies of the Software, and to permit persons to whom the Software is | |
| # furnished to do so, subject to the following conditions: |
| $.ajaxSetup({ | |
| beforeSend: function(xhr, settings) { | |
| if (settings.type == 'POST' || settings.type == 'PUT' || settings.type == 'DELETE') { | |
| function getCookie(name) { | |
| var cookieValue = null; | |
| if (document.cookie && document.cookie != '') { | |
| var cookies = document.cookie.split(';'); | |
| for (var i = 0; i < cookies.length; i++) { | |
| var cookie = jQuery.trim(cookies[i]); | |
| // Does this cookie string begin with the name we want? |
###IAB1 Arts & Entertainment
IAB1-1 Books & Literature
IAB1-2 Celebrity Fan/Gossip
IAB1-3 Fine Art
IAB1-4 Humor
IAB1-5 Movies
IAB1-6 Music
IAB1-7 Television
###IAB2 Automotive
| class Person | |
| def initialize(attributes) | |
| attributes.each do |attribute_name, attribute_value| | |
| ##### Method one ##### | |
| # Works just great, but uses something scary like eval | |
| # self.class.class_eval {attr_accessor attribute_name} | |
| # self.instance_variable_set("@#{attribute_name}", attribute_value) | |
| ##### Method two ##### | |
| # Manually creates methods for both getter and setter and then |
| Para recategorizarte en el Monotributo, la aplicación de AFIP da error de Javascript por todos lados. | |
| A menos que entres con Internet Explorer... | |
| Para hacer el trámite en Chrome, Firefox o cualquier browser decente: | |
| - Entrá con tu clave fiscal | |
| - Abrí la aplicación de "Monotributo" | |
| - Ignorá el formulario y abrí la siguiente URL: | |
| https://servicios1.afip.gov.ar/tramites_con_clave_fiscal/monotributo/valida_cuit.asp?tramite=3&cuit=___TU_CUIT___&intesoc=N&eventual=N&coop=N&cuitcoop=0 |
| docker ps | awk {' print $1 '} | tail -n+2 > tmp.txt; for line in $(cat tmp.txt); do docker kill $line; done; rm tmp.txt |
| - Check rails version | |
| $ rails -v | |
| - To update rails | |
| $ gem update rails | |
| - Creating a new rails app using postgresql | |
| $ mkdir rails_projects | |
| $ cd rails_projects | |
| $ rails new myapp --database=postgresql |
| ======= Prolbem ================================================================================================================= | |
| I have installed : ruby-2.0.0,postgres-9.2 , now in rails app when I execute: | |
| rake db:create , command I get: | |
| PG::InvalidParameterValue: ERROR: new encoding (UTF8) is incompatible with the encoding of the template database (SQL_ASCII) | |
| HINT: Use the same encoding as in the template database, or use template0 as template. | |
| : CREATE DATABASE "my_db_name" ENCODING = 'unicode'....... | |
| bin/rake:16:in `load' |
| git branch -m old_branch new_branch # Rename branch locally | |
| git push origin :old_branch # Delete the old branch | |
| git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
Command Line
pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb - load your rails into a pry sessionDebugger