Skip to content

Instantly share code, notes, and snippets.

View mshamma's full-sized avatar

Mohammed Shamma mshamma

View GitHub Profile
@mshamma
mshamma / dataextension_detail.py
Created April 18, 2018 23:18
Marketing Cloud Data Extension Details with Columns
from django.core.management.base import BaseCommand
from FuelSDK import ET_Client, ET_DataExtension, ET_DataExtension_Column
class Command(BaseCommand):
help = 'Queries data extensions (including columns) per Business Unit from Marketing Cloud'
client_id = 'xxxx'
clientsecret = 'xxxxx'
def add_arguments(self, parser):
pass
import Ember from 'ember';
export default Ember.Component.extend({
tagName: "section",
page: 1,
paginateBy: 10,
paginatedItems: Ember.computed('amenities', 'page', function(){
var i = (parseInt(this.get('page')) - 1) * parseInt(this.get('paginateBy'));
var j = i + parseInt(this.get('paginateBy'));
return this.get('items').slice(i, j);
@mshamma
mshamma / django_jwt_cookie.py
Created March 21, 2017 21:12 — forked from elnygren/django_jwt_cookie.py
Teach Django to use JWT tokens inside the session cookie - plays well with django-rest-framework-jwt.
@mshamma
mshamma / main.go
Created August 28, 2016 22:26 — forked from phalt/main.go
Simple HTTP API in Go
package main
import (
"github.com/gin-gonic/gin"
"database/sql"
"github.com/coopernurse/gorp"
_ "github.com/mattn/go-sqlite3"
"log"
"time"
"strconv"
@mshamma
mshamma / introrx.md
Created November 20, 2015 21:16 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing