Skip to content

Instantly share code, notes, and snippets.

Avatar
🤠
Coding

Jelle Van de Vliet jellevdvliet

🤠
Coding
View GitHub Profile
View apiWalmart.js
import NodeRSA from "node-rsa";
const keyData = {
consumerId: "CONSUMER_ID",
privateKey: `-----BEGIN RSA PRIVATE KEY-----
MY PRIVATE KEY
-----END RSA PRIVATE KEY-----`,
keyVer: 1,
impactId: "YOUR IMPACT AFFILIATE ID" // not required
},
@jellevdvliet
jellevdvliet / aliExpressApi.js
Last active Jun 15, 2021
Making an API call to the AliExpress Affiliate API. Explains how to sign the request and create the correct hash.
View aliExpressApi.js
import crypto from "crypto";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone";
dayjs.extend(utc);
dayjs.extend(timezone);
const API_URL = "http://gw.api.taobao.com/router/rest";
const API_SECRET = "FIND THIS IN THE AE CONSOLE";
@jellevdvliet
jellevdvliet / indexAccountsToCloudsearch.js
Created Dec 20, 2016 — forked from ryanfitz/indexAccountsToCloudsearch.js
index dynamodb data to cloudsearch using AWS Lambda
View indexAccountsToCloudsearch.js
var AWS = require('aws-sdk');
exports.handler = function(event, context) {
var cloudsearchdomain = new AWS.CloudSearchDomain({endpoint: 'doc-dev-cinch-accounts-ltmqj5gt5mjb5hg5eyqaf2v5hu.us-east-1.cloudsearch.amazonaws.com'});
var documents = event.Records.map(function(record) {
var data = {id : record.dynamodb.Keys.id.S};
if (record.eventName === 'REMOVE') {
data.type = 'delete'
@jellevdvliet
jellevdvliet / indexAccountsToCloudsearch.js
Created Dec 20, 2016 — forked from ryanfitz/indexAccountsToCloudsearch.js
index dynamodb data to cloudsearch using AWS Lambda
View indexAccountsToCloudsearch.js
var AWS = require('aws-sdk');
exports.handler = function(event, context) {
var cloudsearchdomain = new AWS.CloudSearchDomain({endpoint: 'doc-dev-cinch-accounts-ltmqj5gt5mjb5hg5eyqaf2v5hu.us-east-1.cloudsearch.amazonaws.com'});
var documents = event.Records.map(function(record) {
var data = {id : record.dynamodb.Keys.id.S};
if (record.eventName === 'REMOVE') {
data.type = 'delete'
View bol_plaza.py
import time
import requests
import hmac
import hashlib
import base64
SECRET_KEY='XXX'
PUBLIC_KEY='YYY'
code = '123' # I was thinking of using a unique md5 hash for each product, but for this example I'll just use 123
View gist:b8b1a6553297a55cd282
Verifying that +jellevdvliet is my blockchain ID. https://onename.com/jellevdvliet
@jellevdvliet
jellevdvliet / DiscogsApi.md
Last active Sep 20, 2015 — forked from younes0/DiscogsApi.md
Setting up Discogs PHP API client with OAuth feature
View DiscogsApi.md

Setting up Discogs PHP API client with OAuth feature

Get these composer packages

"guzzlehttp/guzzle": "4.1.x",
"guzzlehttp/oauth-subscriber": "0.1.x",
"league/oauth1-client": "~1.0",