Skip to content

Instantly share code, notes, and snippets.

View drewrothstein's full-sized avatar

Drew Rothstein drewrothstein

View GitHub Profile
@drewrothstein
drewrothstein / expo.json
Created January 21, 2019 18:22
Expo: Google Developer Console `json`
{
"installed": {
"client_id": "1234567890-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com",
"project_id": "yourapp",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"redirect_uris": [
"urn:ietf:wg:oauth:2.0:oob",
"http://localhost"
@drewrothstein
drewrothstein / expo.plist
Created January 21, 2019 18:20
Expo: Firebase Console `plist`
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AD_UNIT_ID_FOR_BANNER_TEST</key>
<string>ca-app-pub-1234567890/1234567890</string>
<key>AD_UNIT_ID_FOR_INTERSTITIAL_TEST</key>
<string>ca-app-pub-1234567890/1234567890</string>
<key>CLIENT_ID</key>
<string>1234567890-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com</string>
@drewrothstein
drewrothstein / expo.plist
Created January 21, 2019 18:17
Expo: Google Developer Console `plist`
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CLIENT_ID</key>
<string>1234567890-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com</string>
<key>REVERSED_CLIENT_ID</key>
<string>com.googleusercontent.apps.1234567890-abcdefghijklmnopqrstuvwxyz</string>
<key>PLIST_VERSION</key>
<string>1</string>
@drewrothstein
drewrothstein / stringdefs
Created May 23, 2018 15:40
ETL_IM_STUPID
ETL_IM_STUPID Eudora does not support enough of the Translation Services API for this.
@drewrothstein
drewrothstein / trans.c-util.c
Created May 23, 2018 15:36
TO_UPP_OR_NOT_TO_UPP
#define TO_UPP_OR_NOT_TO_UPP(proc) (HaveOSX() ? proc : proc##UPP)
...
/************************************************************************
* HaveOSX - are we running Mac OS X or bettter
************************************************************************/
Boolean HaveOSX(void)
{
return GetOSVersion() >= 0x1000;
@drewrothstein
drewrothstein / StringDefs.h-pop.c
Created May 23, 2018 15:25
kerberos: meaningless
#define KERBEROS_FAKE_PASS 9620 /*meaningless*/ //Meaningless argument to Kerberos password
...
#ifdef TWO
if (kerb4)
GetRString(args,KERBEROS_FAKE_PASS);
else
#endif
PCopy(args,(*CurPers)->password);
//-------------------------------------------------------------------------
// DemoExpired
//
// This routine is called every time we wish to make sure this demo version as not yet
// expired.
//
// Depending on the code returned by TimeStampValid, the demo may have expired.
// If the current date is past the demo expiration date, or if the current date
// is _before_ the date the demo was first run, then the demo has expired.
//-------------------------------------------------------------------------
/**********************************************************************
* Code to prevent virus scanners and other stupid software from
* screwing us up when we're decoding IMAP messages.
*
* IMAP downloads its messages to a temp file in the spool folder.
* During idle time, Eudora goes through the Spool folder looking
* for these temp files. When one is found, the messages are decoded
* and placed in the proper IMAP mailbox. The temp file is then erased
*
* Now the bad part: certain virus scanners like Norton AnitVirus
@drewrothstein
drewrothstein / config.yml
Created May 20, 2018 16:21
CircleCI 2.0 + Golang + Glide + Unit Tests
version: 2
jobs:
build:
docker:
- image: circleci/golang:1.8
working_directory: /go/src/github.com/<github username>/<project>
environment:
TEST_RESULTS: /tmp/test-results
@drewrothstein
drewrothstein / cmq.lua
Created August 30, 2017 03:21
hammerspoon cmd+q twice
-- Press Cmd+Q twice to quit
local quitModal = hs.hotkey.modal.new('cmd','q')
function quitModal:entered()
hs.alert.show("Press Cmd+Q again to quit", 1)
hs.timer.doAfter(1, function() quitModal:exit() end)
end
local function doQuit()