Skip to content

Instantly share code, notes, and snippets.

View marianzange's full-sized avatar

Marian Zange marianzange

  • 08:28 (UTC -07:00)
View GitHub Profile
@marianzange
marianzange / mensabot.php
Created January 19, 2011 17:51
A simple bot that extracts the daily lunch menu of my college's cafeteria and posts it to twitter.
<?php
// Load required libs and stuff
require_once('lib/twitteroauth/twitteroauth.php');
require_once('config.php');
require_once('lib/simple_html_dom.php');
$tweets = Array();
$content = Array();
@marianzange
marianzange / config.php
Created January 20, 2011 19:32
Config file for mensabot
<?php
define('CONSUMER_KEY', 'YOURCONSUMERKEY');
define('CONSUMER_SECRET', 'YOURCONSUMERSECRET');
define('OAUTH_TOKEN', 'YOUROAUTHTOKEN');
define('OAUTH_SECRET', 'YOUROAUTHSECRET');

Keybase proof

I hereby claim:

  • I am marianzange on github.
  • I am iopanic (https://keybase.io/iopanic) on keybase.
  • I have a public key ASBeFnE9XucA6E-UhekCcRvu2CCRb5SgDRrSqY-TX6D0fQo

To claim this, I am signing this object:

@marianzange
marianzange / coinbaseProSignature.js
Created August 20, 2018 13:19
Coinbase Pro HMAC signature generation for Postman
// Computes the HMAC for requests sent to the Coinbase Pro API.
//
// - Add the following code as Postman pre-request script
// - Adapt the getPatch function an the variable names according to your needs
const timestamp = Date.now() / 1000;
function getPath(url) {
// URL path regex works only if your URLs look like this: {{api_url}}/resource
// If you use hardcoded URLs or any other scheme, adapt the regex pattern!