• Notes from September Projects

    Worked on an odoo setup in saltstack in September. It runs on Debian and Prostgres both of which I’ve never used before. It’s not difficult to find what you’re looking for if you know the equivalent in it’s respective program. These are my notes on the things I learned. Some of it might not make sense out of context. Redirect a domain locally https://gist.github.com/soheilhy/8b94347ff8336d971ad0#step-9-optional----redirecting-based-on-host-name on local machine (mac) edit sudo nano /etc/hosts add the the domain name(s) to the localhost ip 127.
  • Truncating a String with JQuery

    For some reason Drupal's views + services + rest output doesn't truncate the body text even when it's set to trim. I couldn't find a quick fix or anyone else having the same problem so I found a Stackoverflow page with a convienent jQuery code snippet to truncate. Changed the substring number from characters to 450 characters and this is the code I ended up with: var node_body = data[key].node_data_field_body_field_body_value; node_body = $.