View external-request.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import electron from 'electron'; | |
function performExternalRequest() { | |
const cookieJar = electron.remote.session.defaultSession.cookies; | |
const cookie = { | |
url: 'https://youdomain.com', | |
name: 'your-cookie-name', | |
value: 'your-cookie-value' | |
}; | |
View imagus-image-upload.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, urllib2, json, cookielib, os, sys | |
try: | |
import requests | |
except: | |
print 'Please install the requests module (pip install requests)' | |
sys.exit() | |
# supress unverified warning from requests | |
requests.packages.urllib3.disable_warnings() |
View imagus-api-example.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib, urllib2, json, cookielib | |
# the api's base url | |
BASE_URL = 'https://api.imagus.com.au/api/v1/' | |
# our credentials | |
USER_ID = 'xxxxx' | |
USER_PASSWORD = 'xxxxx' | |
# get the various login urls |
View datalog-vagrantfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "puppetlabs/centos-7.0-64-nocm" | |
config.vm.provision "shell", inline: <<-SHELL | |
wget http://internode.dl.sourceforge.net/project/datalog/datalog/2.5/datalog-2.5.tar.gz | |
sudo tar -zxf datalog-2.5.tar.gz | |
pushd datalog-2.5 |