Skip to content

Instantly share code, notes, and snippets.

View anmolgkv's full-sized avatar
🏠
Working from home

Anmol Kumar anmolgkv

🏠
Working from home
View GitHub Profile
public void createTasksForNewAccounts(List<Account> newAccounts) {
List<Task> tasks = new List<Task>();
for(Account account : newAccounts) {
Task newTask = new Task();
newTask.WhatId = account.Id;
newTask.OwnerId = account.OwnerId;
newTask.Subject = getTaskSubject(account);
tasks.add(newTask);
}
//Generated by wsdl2apex
public class SoapAPI {
public class Entity {
public SoapAPI.Attribute[] attributes;
public SoapAPI.Attachment[] attachments;
private String[] attributes_type_info = new String[]{'attributes','http://webservice.embedded.server.qa.backend.com/',null,'0','-1','true'};
private String[] attachments_type_info = new String[]{'attachments','http://webservice.embedded.server.qa.backend.com/',null,'0','-1','true'};
private String[] apex_schema_type_info = new String[]{'http://webservice.embedded.server.qa.backend.com/','false','false'};
private String[] field_order_type_info = new String[]{'attributes','attachments'};
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.URI;
import java.net.URLEncoder;
import java.io.UnsupportedEncodingException;
const express = require("express"),
dotenv = require("dotenv"),
jsforce = require("jsforce"),
bodyParser = require("body-parser"),
session = require("express-session"),
decode = require("salesforce-signed-request");
dotenv.config();
const app = express();
const { promisify } = require('util');
const xml2js = require('xml2js');
const parser = new xml2js.Parser();
const parseString = promisify(parser.parseString);
var jsonexport = promisify(require('jsonexport'));
const fs = require('fs');
const {sep} = require('path');
@anmolgkv
anmolgkv / index.php
Last active September 11, 2016 04:37
<?php
$start_word = 'hello';
$end_word = 'world';
echo "Start word: ". $start_word . "<br />";
echo "End word: ". $end_word . "<br />";
echo "Running the test.py...";
echo "</br>";
$output = exec("python test.py ".$start_word." ".$end_word);
echo 'output from python script: ';
var_dump( json_decode($output, true));