I hereby claim:
- I am hamchapman on github.
- I am hamchapman (https://keybase.io/hamchapman) on keybase.
- I have a public key ASDeP9BIV34CHinCUSL4wN9tjn437LvGi8TQooWBCT86ggo
To claim this, I am signing this object:
var Chatkit = require('../target/index'); | |
var fs = require('fs'); | |
// var PusherPlatform = require('../node_modules/pusher-platform-node/target/index'); | |
// Just for local testing where using self signed certs | |
// process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; | |
// const baseClient = new PusherPlatform.BaseClient({ | |
// host: 'localhost', |
const server = require('server') | |
const fetch = require('node-fetch') | |
const Chatkit = require('pusher-chatkit-server') | |
const { get, post } = server.router | |
const { json, header, status, redirect } = server.reply | |
const credentials = require('./credentials.json') | |
const chatkit = new Chatkit.default(credentials) |
const chatkit = new Chatkit.default({ | |
instanceLocator: "YOUR_INSTANCE_LOCATOR", | |
key: "YOUR_KEY" | |
}); | |
const userId = 'YOUR_USER_ID'; | |
// this returns the user as expected | |
chatkit.getUsersByIds([userId]) | |
.then((res) => { |
I hereby claim:
To claim this, I am signing this object:
// | |
// ViewController.swift | |
// PusherTest | |
// | |
// Created by Hamilton Chapman on 21/10/2014. | |
// Copyright (c) 2014 Pusher. All rights reserved. | |
// | |
import UIKit |
import UIKit | |
class ViewController: UIViewController { | |
let wSock = wSocket(key: "afa4d38348f89ba9c398") | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
var ch = wSock.subscribe("test-channel") | |
ch.bind("test-event", { (data: JSON) -> Void in |
PID/THRD SYSCALL(args) = return | |
33272/0x2697e7: getsid(0x0, 0x110000D, 0xFBD00) = 32838 0 | |
33272/0x2697e7: getgroups(0x0, 0x0, 0x0) = 13 0 | |
33272/0x2697e7: getgroups(0xD, 0x7F9CC1E00380, 0x0) = 13 0 | |
33272/0x2697e7: seteuid(0x0, 0x7F9CC1E00380, 0x0) = 0 0 | |
33272/0x2697e7: setuid(0x0, 0x7F9CC1E00380, 0x0) = 0 0 | |
33272/0x2697e7: setegid(0x0, 0x7F9CC1E00380, 0x0) = 0 0 | |
33272/0x2697e7: seteuid(0x0, 0x7F9CC1E00380, 0x0) = 0 0 | |
33272/0x2697e7: open_nocancel(".\0", 0x0, 0x1) = 3 0 | |
33272/0x2697e7: fstat64(0x3, 0x7FFF53C1A770, 0x0) = 0 0 |
PID/THRD SYSCALL(args) = return | |
32264/0x2657e0: thread_selfid(0x0, 0x1DC0, 0x7FFF65F69550) = 2512864 0 | |
32264/0x2657e0: csops(0x0, 0x0, 0x7FFF513C91C4) = 0 0 | |
32264/0x2657e0: issetugid(0x0, 0x0, 0x0) = 0 0 | |
32264/0x2657e0: shared_region_check_np(0x7FFF513C70F8, 0x10E836000, 0x4) = 0 0 | |
32264/0x2657e0: getpid(0x1, 0x10E899000, 0x49656E69) = 32264 0 | |
32264/0x2657e0: __mac_syscall(0x7FFF8D4F2E47, 0x2, 0x7FFF513C8888) = 0 0 | |
32264/0x2657e0: stat64("/AppleInternal\0", 0x7FFF513C8908, 0x0) = -1 Err#2 | |
32264/0x2657e0: audit_session_self(0x7FFF513C87C0, 0x7FFF513C85F8, 0x4) = 4099 0 | |
32264/0x2657e0: geteuid(0x7FFF513C87C0, 0x7FFF513C85F8, 0x0) = 0 0 |
launch://x-callback-url/clipboard?attach=photo:last&x-success={{dayone://post?entry=%23homescreen&imageClipboard=1}} |
payload = { email: "hamchapman@example.com", password: "cheeseburgers" }.to_json | |
req = Net::HTTP::Post.new uri | |
req.body = payload | |
req.add_field "Content-Type", "application/json" | |
response = Net::HTTP.start(uri.hostname, uri.port, :use_ssl => true) do |http| | |
http.verify_mode = OpenSSL::SSL::VERIFY_NONE | |
http.ssl_version = :SSLv3 | |
http.request(req) |