Skip to content

Instantly share code, notes, and snippets.

Dim ws As Worksheet
Set ws = Worksheets("CreateObject")
Dim createObjectBody As String
createObjectBody = sfc.CREATE_OBJECT
createObjectBody = Replace(createObjectBody, "{{sessionId}}", sessionId)
createObjectBody = Replace(createObjectBody, "{{fullName}}", ws.Cells(3, 2))
createObjectBody = Replace(createObjectBody, "{{deploymentStatus}}", "Deployed")
createObjectBody = Replace(createObjectBody, "{{description}}", ws.Cells(6, 2))
createObjectBody = Replace(createObjectBody, "{{label}}", ws.Cells(1, 2))
createObjectBody = Replace(createObjectBody, "{{nameField.label}}", ws.Cells(4, 2))
Dim ws As Worksheet
Set ws = Worksheets("CreateField")
Dim createFieldsBody As String
createFieldsBody = sfc.CREATE_BASE
createFieldsBody = Replace(createFieldsBody, "{{sessionId}}", sessionId)
Dim createFields As String
createFields = ""
For rowNum = 4 To 7
Dim createField As String
createField = sfc.CREATE_TEXTFIELD_BASE
import base64
import json
import hmac
import hashlib
import Crypto
from Crypto.Signature import PKCS1_v1_5
from Crypto.Hash import SHA256
from Crypto.PublicKey import RSA
import datetime
import time
<apex:page showHeader="false"
standardStyleSheets="false"
docType="html-5.0">
<html lang="ja">
<head>
<meta charset="utf-8"/>
<script type="text/javascript">
(function() {
if (typeof window.janrain !== 'object') window.janrain = {};
if (typeof window.janrain.settings !== 'object') window.janrain.settings = {};
public with sharing class CallTwilio {
public static void sendSMS(String sms_message) {
TwilioRestClient client = TwilioAPI.getDefaultClient();
TwilioMessage message = client.getAccount().getMessages().create(new Map<String, String>{
'To' => '+*********',
'From' => '+*********',
'Body' => sms_message
});
}
}
@RestResource(urlMapping='/MyRestContextExample/*')
global with sharing class AnonymousHandler {
@HttpGet
global static Account doGet() {
RestRequest req = RestContext.request;
RestResponse res = RestContext.response;
res.addHeader('Access-Control-Allow-Origin', '*');
String accountId = req.requestURI.substring(req.requestURI.lastIndexOf('/')+1);
Account result = [SELECT Id, Name, Phone, Website FROM Account WHERE Id = :accountId];
return result;
@tzmfreedom
tzmfreedom / package.xml
Last active August 29, 2015 14:07
template for ant salesforce package.xml
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>ApexPage</name>
</types>
<types>
<members>*</members>
<name>ApexTrigger</name>
</types>
Sub Test_Proc()
Set ws = ThisWorkbook.ActiveSheet
Dim driver As New SeleniumWrapper.WebDriver
Dim By As New By, Assert As New Assert, Verify As New Verify, Waiter As New Waiter
driver.Start "firefox", "https://********"
driver.setImplicitWait 5000
driver.get "/"
driver.findElementByName("domain").Clear
@tzmfreedom
tzmfreedom / pg_notify.php
Last active March 8, 2023 23:09
postgresql notify/listen sample
<?php
$db = new PDO(
"pgsql:dbname=postgres host=localhost port=5432", 'postgres', 'postgres', [
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
]
);
$db->exec('LISTEN hoge');
var gulp = require('gulp');
var webserver = require('gulp-webserver');
var source = require('vinyl-source-stream');
var browserify = require('browserify');
var plugins = require('gulp-load-plugins')();
//web server立ち上げ
gulp.task('webserver', function() {
gulp.src('./')
.pipe(webserver({