Skip to content

Instantly share code, notes, and snippets.

Jeremy Nagel jeznag

  • COzero
  • Sydney
Block or report user

Report or block jeznag

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
jeznag / SpecialFormTest.php
Last active Aug 29, 2015
Connecting PHPUnit with PhantomJS
View SpecialFormTest.php
include_once 'TestScaffold.php';
class SpecialFormTest extends TestScaffold
public function testTitle() {
$this->url('http://localhost/special_form/public/' );
jeznag / person.js
Created May 17, 2015
Person deserializer
View person.js
import DS from 'ember-data';
import config from '../config/environment';
var counter = 1;
export default DS.RESTSerializer.extend({
extractSingle: function(store, type, payload, id) {
var people = payload.results.people;
payload = {
View Person.js
import DS from 'ember-data';
import Ember from 'ember';
var inflector = Ember.Inflector.inflector;
inflector.irregular('person', 'people');
inflector.singular(/person/, 'person');
let Person = DS.Model.extend({
fullName: DS.attr( 'string' ),
View gist:6d08233bd3af27761a9e
"people": [
"name": "Oliver Oldham",
"location": "Sydney Australia",
"description": "Enterprise Technologist in Cloud and Infrastructure. General Manager of the Cloud Practice @ Telstra, critical thinker and Jumps from perfectly good planes.",
"photo": ""
"name": "Tim Love",
jeznag / actual JSON payload
Created May 17, 2015
Actual JSON payload from Kimono
View actual JSON payload
"name": "followerwonk",
"count": 50,
"url": "",
"results": {
"people": [
"name": "[Name redacted]",
"location": "Sydney Australia",
"description": "Enterprise Technologist in Cloud and Infrastructure. General Manager of the Cloud Practice @ Telstra, critical thinker and Jumps from perfectly good planes.",
jeznag / gist:62f22aa9b7a54d7ed107
Created May 22, 2015
Get profile details for Zoho CRM user using deluge script
View gist:62f22aa9b7a54d7ed107
//get details for this user
userResp = getUrl((""));
info userResp;
users = userResp.executeXPath("/users/user");
if ((users != null) && (users != "")) {
userList = users.toList("-|-");
for each user in userList {
idNode = user.executeXPath("/user/@id");
id = idNode.executeXPath("/id/text()");
if (id == ownerId) {
jeznag / gist:836b3963f4398531e99f
Created May 22, 2015
Mass update lookups in Zoho CRM using custom function
View gist:836b3963f4398531e99f
void update_vendor_lookup (int finance_equity_id)
finance_equity_obj = zoho.crm.getRecordById("CustomModule4", finance_equity_id);
lender_string = finance_equity_obj.get("Lender");
lender_id = 0;
if (lender_string.contains("Adelaide")){
//figure out appropriate lookup value based on picklist
lender_id = 1002375000002270019;
jeznag / gist:7e12bf5c68a36ad44fbd
Created May 31, 2015
Update amount for Zoho CRM potential based on related products
View gist:7e12bf5c68a36ad44fbd
potential_obj = zoho.crm.getRecordById("Potentials", potential_id);
related_products = zoho.crm.getRelatedRecords("Products", "Potentials", potential_id.toString(), 1,200);
total_amount = 0.0;
for each product in related_products {
total_amount = total_amount + product.get("Unit Price").toDecimal();
potential_obj.put("Amount", total_amount);
potential_obj.put("Populate amount based on products associated", false);
jeznag / gist:0baf6f2fe9f54857bfb7
Created May 31, 2015
Add call log to Zoho CRM lead
View gist:0baf6f2fe9f54857bfb7
void workflowspace.add_call_log(int lead_id)
lead_obj = zoho.crm.getRecordById("Leads", input.lead_id);
lead_name = ((lead_obj.get("First Name")) + " ") + lead_obj.get("Last Name");
lead_company = lead_obj.get("Company");
call_log_obj = map();
call_log_obj.put("Subject", "Call with " + lead_name);
call_log_obj.put("Call Type", "Outbound");
call_log_obj.put("SEMODULE", "Leads");
call_log_obj.put("SEID", input.lead_id);
jeznag / gist:e16cb7ad1d56e68cef75
Created Jun 3, 2015
Add notes to Zoho CRM contact
View gist:e16cb7ad1d56e68cef75
void workflowspace.add_notes_to_a_contact(int contact_id)
note_text = "Sample note";
note_obj = map();
note_obj.put("SEMODULE", "Contacts");
note_obj.put("SEID", input.contact_id);
note_obj.put("Note Title", "Test Title");
note_obj.put("Note Content", note_text);
create_resp = zoho.crm.create("Notes", note_obj);
info create_resp;
You can’t perform that action at this time.