Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ghinch on github.
  • I am greghinch (https://keybase.io/greghinch) on keybase.
  • I have a public key ASBGSi7rHV60nGf7ABF3V2Hxsnyv1YesmtVZ7RiNIqAfpgo

To claim this, I am signing this object:

### Keybase proof
I hereby claim:
* I am ghinch on github.
* I am greghinch (https://keybase.io/greghinch) on keybase.
* I have a public key ASAbV47sez13GY4Qp1bJ95Xz9BjECWI67slNJ25Sw0d2-Qo
To claim this, I am signing this object:
@ghinch
ghinch / intercom_email_update.py
Created August 1, 2017 16:08
Use this script to update the email address of a user on Intercom
#!/usr/bin/python
import urllib2
import json
def run():
print("--== Intercom user email updater ==--")
api_key = raw_input("API key to use: ")
headers = {
'Accept': 'application/json',
Verifying I am +greghinch on my passcard. https://onename.com/greghinch
def _send(self, email_message):
from_email = sanitize_address(email_message.from_email, email_message.encoding)
recipients = [sanitize_address(addr, email_message.encoding)
for addr in email_message.recipients()]
try:
post_data = []
post_data.append(('to', (",".join(recipients)),))
post_data.append(('text', email_message.body,))
post_data.append(('subject', email_message.subject,))
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Notification 3.7-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- buildnumber-maven-plugin:1.0-beta-3:create (default) @ notification ---
[INFO] Storing buildNumber: 20120606-2119_greg at timestamp: 1339042798936
[INFO]
[INFO] --- maven-antrun-plugin:1.4:run (build-info) @ notification ---
-------------------------------------------------------------------------------
Test set: emi.emsrest.counters.svc.CookieValidatorTest
-------------------------------------------------------------------------------
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.829 sec
-------------------------------------------------------------------------------
Test set: emi.emsrest.counters.svc.CountersCrudTest
-------------------------------------------------------------------------------
Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.901 sec
-------------------------------------------------------------------------------
Test set: emi.emsrest.counters.svc.CountersExpirationTest
public class ManagedDataLineIngestBoss extends BaseBoss<ManagedDataLine> {
public static ManagedDataLineIngestBoss INSTANCE;
<<<<<<< HEAD
private static final Logger LOG = Logger.getLogger(ManagedDataLineIngestBoss.class);
@Autowired(required = true) private ManagedDataLineDao dataLineDao;
@Autowired(required = true) private IngestTimelineEntryDao timelineEntryDao;
@Autowired(required = true) private IngestionService ingestionService;
@Autowired(required = true) private AdministrativeNotifier notifier;
public class AutomatedIngestBoss extends BaseBoss<AutomatedIngestSource> {
public static AutomatedIngestBoss INSTANCE;
<<<<<<< HEAD
private static final Logger LOG = Logger.getLogger(AutomatedIngestBoss.class);
@Autowired(required = true) private AutomatedIngestSourceDao automatedIngestSourceDao;
@Autowired(required = true) private SftpPollingService sftpPollingService;
@Value("${autostart.automated_ingest.boss}") private boolean autostart;
=======
match('/admin/counter_service/init', :method => :get).to(:controller => :admin, :action => :counters_service_init).name(:counters_service_init)
metadata_thingies.map{|m| m.table_name.to_s}.each do |res|
match("/#{res}/admin", :method => :get).to(:controller => res.to_sym, :action => :admin).name("#{res}_admin") unless res == "view_configurations" # :playlists_admin, :pitches_admin, etc. generated here
end