This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
class BrokenController extends Controller | |
{ | |
public function index() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 指定されたオブジェクトのレコードタイプを全て取得する | |
* | |
* @param String objName オブジェクト名 | |
* @return Schema.RecordTypeInfo レコードタイプ一覧 | |
*/ | |
public List<Schema.RecordTypeInfo> getRecordTypeByObjectName(String objName) { | |
List<Schema.RecordTypeInfo> recordTypes; | |
Schema.SObjectType sType = (Schema.SObjectType)Schema.getGlobalDescribe().get(objName); | |
if(sType != null){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class OAuth { | |
public static HttpRequest signRequest(HttpRequest req, String consumerKey, String consumerSecret, String oauth_token, String oauth_token_secret) { | |
String nonce = String.valueOf(Crypto.getRandomLong()); | |
String timestamp = String.valueOf(DateTime.now().getTime() / 1000); | |
Map<String,String> parameters = new Map<String,String>(); | |
parameters.put('oauth_signature_method','HMAC-SHA1'); | |
parameters.put('oauth_consumer_key', consumerKey); | |
parameters.put('oauth_timestamp', timestamp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form action="xxx.php" method="post" id="send-form"> | |
<input name="submit" type="submit" value="送信" /> | |
</form> | |
<script type="text/javascript"> | |
var submit_flg = false; | |
$('#send-form').submit(function(){ | |
if(submit_flg) return false; | |
submit_flg = true; | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestResource(urlMapping='/insert/example') | |
global with sharing class Insert_example { | |
@HttpPost | |
global static CustomObject doPost(){ | |
RestRequest req = RestContext.request; | |
Map<String, String> params = req.params; | |
CustomObject obj = new CustomObject(); //カスタムを作成 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class API_Utils { | |
/** | |
* 全ての項目を取得するSOQLを作る | |
* 例) | |
* String all_string = getAllItem('Campaign'); | |
* String query = 'SELECT ' + all_string + ' FROM Campaign'; | |
* | |
* @param String sObjName オブジェクト名 | |
* @return String カンマ区切りの全項目 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
web: vendor/bin/heroku-php-apache2 htdocs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"php": "~5.6.0", | |
"ext-mbstring": "*" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root = true | |
[*] | |
end_of_line = lf | |
charset = utf-8 | |
indent_style = tab | |
indent_size = 4 | |
trim_trailing_whitespace = false | |
insert_final_newline = false |