Consumes an API that uses OAuth.
Copy the file example.service.cnf to service.cnf and change the configuration variables to your liking, then:
$> python2 oauth-consumer.py [http method] [uri] [data]
For example:
| deploy: | |
| git checkout master | |
| aws s3 sync . s3://pace.zengerink.com --cache-control "public, max-age=604800" --exclude ".git/*" --exclude "Makefile" |
| #!/usr/bin/env python | |
| """ | |
| IP | |
| ~~ | |
| Return visitors public IP address. | |
| Copyright (c) 2014 Teun Zengerink | |
| Permission is hereby granted, free of charge, to any person obtaining a | |
| copy of this software and associated documentation files (the "Software"), |
| #!/bin/bash -e | |
| # | |
| # IPTABLES FIREWALL | |
| # ----------------- | |
| # Script for setting your iptables firewall. Configure the variables to your | |
| # liking and start the firewall. Copy the file to `/usr/local/sbin` or the | |
| # directory of your choice. | |
| # | |
| # Usage: `./firewall.sh [restart|start|stop|status]` | |
| # |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| BROWSER | |
| ------- | |
| Get internet pages, send post requests, inspect HTML using BeautifulSoup | |
| or simply check response codes of an URL. | |
| Example usage: |
| #!/bin/bash -e | |
| # | |
| # GUNICORN DEPLOY SCRIPT | |
| # ---------------------- | |
| # Script to deploy your application with Gunicorn. It can be called by your | |
| # process manager (eg. supervisor). Your application should use a virtual | |
| # environment in a subdirectory. | |
| # | |
| # Copyright (c) 2013-2014, T. Zengerink | |
| # Licensed under MIT License. |
| /* DATABASE MODIFICATIONS TABLE | |
| * ---------------------------- | |
| * | |
| * Create a database modifications table to keep track of all changes made to | |
| * the structure of a database. | |
| * | |
| * At the bottom of all your scripts that modify the structure, you put a line | |
| * like: | |
| * | |
| * INSERT INTO `database_modifications` (`id`, `script_name`, `comments`) |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| """ | |
| GOOGLE SEARCH | |
| ------------- | |
| Command line access to advanced Google searches. | |
| To see all options use the `--help` flag. | |
| Copyright (c) 2013, T. Zengerink | |
| Licensed under MIT License |
| /*! | |
| * Desire.js | |
| * --------- | |
| * | |
| * Create the namespaces you so desire. | |
| * | |
| * // Create a new module | |
| * desire("APP.MyModule.MySubModule", function(){ | |
| * return { | |
| * myProp : "Your property value", |
| /*! | |
| * I18N.js | |
| * ------- | |
| * | |
| * Add internationalisation to your JavaScript application. | |
| * | |
| * // Get current language | |
| * I18N.lang(); // en | |
| * | |
| * // Set current language |