Skip to content

Instantly share code, notes, and snippets.

View realadeel's full-sized avatar
🏠
Working from home

Adeel Ahmad realadeel

🏠
Working from home
View GitHub Profile
@realadeel
realadeel / Mandrill preserve recipients false
Created February 11, 2014 17:09
Example Mandrill message send call - to demonstrate code for preserve recipients.
response = MANDRILL.messages_send(
message: {
html: email.body,
subject: email.subject,
from_email: email.from_email,
from_name: email.from_name,
to: email.recipients.map{|recipient| {email: recipient}},
preserve_recipients: false,
auto_text: true,
inline_css: true,
[
{
"foo": "bar"
},
{
"bar": "foo"
}
]
@realadeel
realadeel / gist:70a08429cb82b1e37513
Last active September 23, 2015 17:16
Git stuff

List local branches sorted by commit date
git for-each-ref --sort=-committerdate refs/heads/

@realadeel
realadeel / stripe-product-images.rb
Created October 15, 2015 07:03
Stripe::Product#images error
Stripe.api_key = 'sk_live_REDACTED'
product = Stripe::Product.retrieve('prod_7ANlgvTDSwqEsk')
product.images
=> []
product.images = ["https://daqj0hamajdep.cloudfront.net/api/file/rnlqHhGJSxS06buwvelQ+name.jpg", "https://daqj0hamajdep.cloudfront.net/api/file/hXesXSFRJSNyfNcJdiwg+name.jpg", "https://daqj0hamajdep.cloudfront.net/api/file/sbWRFmORRYOglcd5LiT8+name.jpg", "https://daqj0hamajdep.cloudfront.net/api/file/GDXMYn1ITWL9GEBVrVTI+name.jpg", "https://daqj0hamajdep.cloudfront.net/api/file/6AULYuihQZO8Bo6SF6fl+name.jpg"]
product.save
@realadeel
realadeel / dash_lambda_food.js
Last active April 2, 2018 13:48
Pressing an Amazon AWS IoT Button to Find the Rright Restaurant - Node.js on AWS Lambda
var AWS = require('aws-sdk');
var sns = new AWS.SNS();
var GoogleMaps = require('googlemaps');
var GooglePlaces = require('node-googleplaces');
var weather = require('openweather-apis');
var stripe = require('stripe')(STRIPE_SECRET_KEY);
var googleConfig = { key: GOOGLE_API_KEY };
var maps = new GoogleMaps(googleConfig);
var places = new GooglePlaces(googleConfig.key);
var direction_params = {
<h1>what is up!!!!</h1>
<p>
<b>this is cool?</b>
</p>
@realadeel
realadeel / test.md
Created February 1, 2023 19:12
test

test