Skip to content

Instantly share code, notes, and snippets.

@wadewegner
wadewegner / upload_rest.py
Last active October 20, 2022 05:59
Upload attachment to Salesforce using Python
import requests
import base64
import json
from simple_salesforce import Salesforce
userName = ''
password = ''
securityToken = ''
instance = ''
@metadaddy
metadaddy / restquery.py
Created November 17, 2011 22:29
Simple query against Force.com REST API in Python
import os
import urllib
import urllib2
import json
import pprint
# Grab credentials from the environment
consumer_key = os.environ['CLIENT_ID']
consumer_secret = os.environ['CLIENT_SECRET']
username = os.environ['USERNAME']
@javan
javan / gist:1168475
Created August 24, 2011 16:32
Fix iPhone home button
Found this tip in comment here: http://www.tipb.com/2011/01/04/tipb-bug-home-button-working-iphone/
1.) Open any application
2.) Press and hold the power button until the slide to shutdown swipe bar appears.
3.) Release Power button
4.) Press and hold Home button Lightly
until screen returns to icon screen