Skip to content

Instantly share code, notes, and snippets.

View smaeda-ks's full-sized avatar
🏠
Timezone will never be easy

Shohei Maeda smaeda-ks

🏠
Timezone will never be easy
View GitHub Profile
@smaeda-ks
smaeda-ks / pre-request.js
Last active October 27, 2022 12:44
Postman OAuth signature generator (Pre-request Scripts)
/*
* This is a Pre-request script for Postman client to remediate OAuth 1.0a issue
* where certain request fails if it has a query parameter that includes some special characters.
*
* NOTE: This Pre-script is only available for "GET" request.
* There's a workaround for POST request.
* See: https://github.com/twitterdev/postman-twitter-ads-api/issues/2
*
* In order to use this Pre-request script, you need to change your "Authorization" type to
* "No Auth" only for the target request and do not apply to the top-level object.
@smaeda-ks
smaeda-ks / OAuth.js
Created April 17, 2019 23:12
Runscope OAuth signature generator (Pre-request Scripts)
/*
This snippet uses variables.get() for oauth token/secret which means
you need to store those in the Shared Environment as a raw text.
OR you may also want to consider using get_secret() instead.
*/
const oauth_consumer_key = variables.get("oauth_consumer_key");
const oauth_consumer_secret = variables.get("oauth_consumer_secret");
const oauth_token = variables.get("oauth_token");
const oauth_secret = variables.get("oauth_secret");
const oauth_signing_key = oauth_consumer_secret + '&' + oauth_secret;
@smaeda-ks
smaeda-ks / debug.log
Last active June 10, 2016 11:49
Ansible filter plugin
$ ansible-playbook -i localhost, hoge.yml
PLAY [localhost] **************************************************************
TASK: [debug ] ****************************************************************
ok: [localhost] => {
"var": {
"dict_merged": {
"foo": {
"bar": 1,