Skip to content

Instantly share code, notes, and snippets.

Avatar

Chun-Yi Liu trantorLiu

View GitHub Profile
@zthomas
zthomas / intercom-delete-old-users.js
Last active Mar 3, 2022
Script to delete and clear old users from intercom. Useful for lowering the monthly bill
View intercom-delete-old-users.js
// License: MIT, feel free to use it!
const Intercom = require('intercom-client');
const appId = 'APP_ID'
const apiKey = 'APP_KEY'
const client = new Intercom.Client(appId, apiKey);
const async = require('async-q')
//REF: https://developers.intercom.com/reference#iterating-over-all-users
//WARNING: you can only have one scroll working at once. you need to wait for that scroll to clear to try again
View paypal_subscription_ext.rb
module PayPal::SDK
module REST
module DataTypes
Payer.class_eval do
object_of :merchant_id, String
end
class ChargeModel < Base
object_of :id, String
object_of :type, String
@ifightcrime
ifightcrime / uploads_controller.rb
Created Jun 17, 2014
Rails JSON file upload with carrierwave (from base64 string)
View uploads_controller.rb
class Api::UploadsController < ApiController
def create
@upload = Upload.new(upload_params)
ensure
clean_tempfile
end
private