Inspired by https://gist.github.com/joshbirk/8363143
Please use Python3
- Create connected-app and obtain
consumer_key
andconsumer_secret
- Install
simple-salesforce
package
CREATE TRIGGER person_notify AFTER INSERT OR UPDATE OR DELETE ON income | |
FOR EACH ROW EXECUTE PROCEDURE notify_trigger( | |
'id', | |
'email', | |
'username' | |
); | |
CREATE TRIGGER income_notify AFTER INSERT OR UPDATE OR DELETE ON income | |
FOR EACH ROW EXECUTE PROCEDURE notify_trigger( | |
'id', |
from django.db import models | |
from wagtail.wagtailsnippets.models import register_snippet | |
from wagtail.wagtailcore.models import Page | |
from modelcluster.fields import ParentalKey | |
from wagtail.wagtailadmin.edit_handlers import InlinePanel | |
@register_snippet | |
class Category(models.Model): |
Inspired by https://gist.github.com/joshbirk/8363143
Please use Python3
consumer_key
and consumer_secret
simple-salesforce
packageThis gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.
To use the script, follow the instructions given in the script's docstring.
For further details, read this blogpost.
The procedure outlined here is inspired by this answer on Stack Overflow.
# coding: utf-8 | |
import json | |
import stripe | |
import datetime | |
# Required for OAuth flow | |
from rauth import OAuth2Service | |
# Our secret key from stripe | |
STRIPE_SECRET_KEY = 'sk_test_xxxxxxxxxxxxx' |
import requests | |
import base64 | |
import json | |
from simple_salesforce import Salesforce | |
userName = '' | |
password = '' | |
securityToken = '' | |
instance = '' |
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
-- Adapted from these sources: | |
-- http://peterdowns.com/posts/open-iterm-finder-service.html | |
-- https://gist.github.com/cowboy/905546 | |
-- | |
-- Modified to work with files as well, cd-ing to their container folder | |
on run {input, parameters} | |
tell application "Finder" | |
set my_file to first item of input | |
set filetype to (kind of (info for my_file)) | |
-- Treats OS X applications as files. To treat them as folders, integrate this SO answer: |
########################################################## | |
# django postgres polling - LISTEN | |
import psycopg2.extensions | |
import select | |
from django.db import connection | |
crs = connection.cursor() # get the cursor and establish the connection.connection | |
pg_con = connection.connection |