Skip to content

Instantly share code, notes, and snippets.

View colmdoyle's full-sized avatar

Colm Doyle colmdoyle

View GitHub Profile
{
"openapi": "3.0.0",
"info": {
"title": "Intercom REST API",
"version": "2.2",
"contact": {
"url": "https://developers.intercom.com/building-apps",
"name": "Intercom Developer Hub"
},
"description": "Retrieve information, keep your data in sync, or take actions programmatically through Intercom's API."
const response = await client.users.profile.get({user: 'USER_ID_GOES_HERE'});
console.log(response);
console.log(response.profile.pronouns);
console.log(response.profile.fields); // These are where custom fields like Department or Location would be
@colmdoyle
colmdoyle / collection.json
Created April 15, 2020 14:44
Slack API Postman Collection
{
"info": {
"_postman_id": "8ad7e7e7-e8f3-45d7-b30b-dd5267eea583",
"name": "Slack Web API",
"description": "One way to interact with the Slack platform is its HTTP RPC-based Web API, a collection of methods requiring OAuth 2.0-based user, bot, or workspace tokens blessed with related OAuth scopes.\n\nContact Support:\n Name: Slack developer relations",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "admin",
curl -X POST \
'https://slack.com/api/chat.postMessage?=' \
-H 'Accept: */*' \
-H 'Accept-Encoding: gzip, deflate' \
-H 'Authorization: Bearer xoxb-YOUR-BOT-TOKEN' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Content-Length: 2377' \
-H 'Content-Type: application/json' \
-H 'Host: slack.com' \
var client = new RestClient("https://slack.com/api/chat.postMessage?=");
var request = new RestRequest(Method.POST);
request.AddHeader("cache-control", "no-cache");
request.AddHeader("Connection", "keep-alive");
request.AddHeader("Content-Length", "2377");
request.AddHeader("Accept-Encoding", "gzip, deflate");
request.AddHeader("Host", "slack.com");
request.AddHeader("Postman-Token", "0c1eb063-b934-48e3-9730-5ae9c1022dab,cf72071a-dbee-46cb-abb6-866f329c7eba");
request.AddHeader("Cache-Control", "no-cache");
request.AddHeader("Accept", "*/*");
ynab(){
sed -i "" "1 s/Description1/memo/g" $1
sed -i "" "1 s/Credit Amount/inflow/g" $1
sed -i "" "1 s/Debit Amount/outflow/g" $1
sed -i "" "1 s/Posted Transactions Date/date/g" $1
}

Keybase proof

I hereby claim:

  • I am colmdoyle on github.
  • I am colmdoyle (https://keybase.io/colmdoyle) on keybase.
  • I have a public key ASAZOtFoaAOZTfW1s1ORCIKJybHb-12wMGK8N7KF_K8SIQo

To claim this, I am signing this object:

foreach ($model as $babe)
{
$this->model($babe);
}
@colmdoyle
colmdoyle / gist:5ac6fc9bcff4a1229ad7
Created December 11, 2014 12:23
irishtechstartups.slack.com Code of Conduct

irishtechstartups.slack.com Code of Conduct

<?php
$content = get_the_content();
$nodes = extract_tags($content, 'h\d+', false);
$headingsList = "";
$currentHeading = 0;