Skip to content

Instantly share code, notes, and snippets.

@BFinc
BFinc / SimpleSalesforceConnection.js
Created December 7, 2017 23:55 — forked from stomita/SimpleSalesforceConnection.js
A Google Apps Script, which simply connects and fetches data from Salesforce RESTful API with OAuth authentication.
/**
* Connect and fetch Salesforce data via OAuth
*/
function queryDataFromSalesforce() {
// Read OAuth consumer key / secret of this client app from script properties,
// which can be issued from Salesforce's remote access setting in advance.
var sfConsumerKey = ScriptProperties.getProperty("sfConsumerKey");
var sfConsumerSecret = ScriptProperties.getProperty("sfConsumerSecret");
if (!sfConsumerKey || !sfConsumerSecret) {
Browser.msgBox("Register Salesforce OAuth Consumer Key and Secret in Script Properties");
@wwright999
wwright999 / categorial_neural.py
Last active July 6, 2018 18:34
Tensor Flow Example of Neural Network with categorical variable encoding
import random
import pandas
from sklearn.cross_validation import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score
from sklearn.preprocessing import LabelEncoder
from sklearn.utils import check_array
import tensorflow as tf
public class Build {
//------------------------------------------------------------------------------
//Account
public class AccountBuilder {
public AccountBuilder withName(String name) {
this.name = name;
return this;
/*
Copyright 2011 Mavens Consulting, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@genekogan
genekogan / scrapeImages.py
Created February 22, 2017 11:49
scraping full size images from Google Images
from bs4 import BeautifulSoup
import requests
import re
import urllib2
import os
import argparse
import sys
import json
# adapted from http://stackoverflow.com/questions/20716842/python-download-images-from-google-image-search

Applied Functional Programming with Scala - Notes

Copyright © 2016-2018 Fantasyland Institute of Learning. All rights reserved.

1. Mastering Functions

A function is a mapping from one set, called a domain, to another set, called the codomain. A function associates every element in the domain with exactly one element in the codomain. In Scala, both domain and codomain are types.

val square : Int => Int = x => x * x
@smcllns
smcllns / GETSALESFORCEREPORT.js
Created October 2, 2015 17:14
Get Salesforce Report data into Google Spreadsheets
var setup = {
// Add your keys
consumerKey: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
consumerSecret: "XXXXXXXXXXXXXX"
};
function onOpen(e) {
var menu = SpreadsheetApp.getUi().createAddonMenu();
menu.addItem('Login to SF', 'menuAuth');
menu.addItem('Update all reports', 'updateTrigger');
@jkentjnr
jkentjnr / gist:64d87004b150f5a8c667
Last active January 25, 2019 03:44
Blog - Loading Data into Salesforce from Google Sheets
// -----------------------------------------
// CREATE CONTACTS FROM GOOGLE SHEET
// -----------------------------------------
// Name of the entry in the Documents entity.
String dataFile = 'DemoExport';
// -----------------------------------------
// Get the URL from Documents and retrieve from Google Sheets as TSV.

Git Cheat Sheet

Commands

Getting Started

git init

or

@josdirksen
josdirksen / Client.scala
Last active August 29, 2015 14:14
HTTP Client in akka-http
import akka.actor.ActorSystem
import akka.http.Http
import akka.stream.FlowMaterializer
import akka.http.model._
import akka.stream.scaladsl._
import akka.stream.scaladsl.Source
import akka.stream.scaladsl.FlowGraphImplicits._
import scala.concurrent.ExecutionContext.Implicits.global
import scala.concurrent.Future