I hereby claim:
- I am dbischof on github.
- I am dominique (https://keybase.io/dominique) on keybase.
- I have a public key whose fingerprint is 9D9E 5F44 B556 808D 4D1D 5A26 58F1 B3D2 5581 C0AC
To claim this, I am signing this object:
/** | |
** Inspired by: https://stackoverflow.com/a/52436395/1756953 | |
** Modified from: https://gist.github.com/harryi3t/dd5c61451206047db70710ff6174c3c1 | |
** | |
** Postman as of Nov 2018 does not support auto-refreshing of Oauth-2 tokens. | |
** This is an exmaple on how in one can refresh their Oauth-2 tokens just using the pre-request scripts. | |
** Pre-requisites: You need to have a refresh token. You can use the Postman app to get one. | |
** | |
** Step 1: Create a Postman environment and set the following variables: | |
** tokenUrl |
import collections, stripe | |
from datetime import datetime | |
stripe.api_key = '' | |
print "Stripe subscription forecast" | |
last_obj = None | |
paydays = {} | |
loop = 0 |
javascript: (function () { | |
var jsCode = document.createElement('script'); | |
jsCode.setAttribute('src', 'https://rawgit.com/dbischof/fb85f76d589123020359e96fce5c5e40/raw/115a2c0667f9c02a90fc7a1226fb09e08bea96a9/qbo-bulk-class.js'); | |
document.body.appendChild(jsCode); | |
}()); |
// ==UserScript== | |
// @name TG PO Stock Due Changer | |
// @description Set stock due date on new TradeGecko purchase orders to current date | |
// @match https://go.tradegecko.com/* | |
// @version 0.2 | |
// ==/UserScript== | |
var targetPage = '/purchase_orders/new'; | |
var currentPage = window.location.pathname; | |
if (currentPage == targetPage) { |
#!/bin/bash | |
echo Finding all pictures in the wrong folder | |
CURDIR=$(pwd) | |
cd /PATH/TO/PICTURES | |
for FOLDER in $(find . -type d -mtime -2 -name "*-*"); do | |
cd $FOLDER |
I hereby claim:
To claim this, I am signing this object:
# Two Fabric related items that tripped me up: | |
# | |
# 1. For most complex code, you have to prepend your code string with code=, as in fab python:code="[Your code]". | |
# Not doing this will result in the following error: | |
# TypeError: python() got an unexpected keyword argument '[the first few chars of your code...]' | |
# | |
# 2. If you have an = in your code, it must be escaped. Not escaping them will result in the following error: | |
# ValueError: too many values to unpack | |
# | |
# Here's a short sample: |
### %> python manage.py shell | |
import settings | |
from django.core.mail import send_mail | |
send_mail('This is the subject', 'Here is the message.', settings.EMAIL_HOST_USER, ['recipient@example.com'], fail_silently=False) | |
# or | |
import settings |