Skip to content

Instantly share code, notes, and snippets.

Mehdi Ait Oufkir mehdimehdi

  • Los Angeles
Block or report user

Report or block mehdimehdi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:5577dac2c10f94494d71fd374364f5ef
<script type="text/javascript">
window._mfq = window._mfq || [];
(function() {
var mf = document.createElement("script");
mf.type = "text/javascript"; mf.async = true;
mf.src = "//";
mehdimehdi /
Created Nov 6, 2016
Handling SMS response from customers
""" more routes before, but does not affect the use case """
def follow_up_with_callee(twilio_data,event_id):
text = twilio_data.get('Body').upper()
task = import_module('switchboard.tasks')
if text == 'remove'.upper():
content = 'Great. will let him know.'
View about.html
{% extends "base.html" %}
{% block content %}
Something special in my about page with a <button id="aboutbutton">about button</button>.
Something less special with some <button>other button</button> which is the same as the home.html button.
View gist:55150df8e6d342115494
Received: by with SMTP id ut2csp3291479iec;
Thu, 30 Apr 2015 11:13:53 -0700 (PDT)
X-Received: by with SMTP id 187mr7446259ioe.6.1430417633051;
Thu, 30 Apr 2015 11:13:53 -0700 (PDT)
Return-Path: <>
Received: from ( [])
by with ESMTPS id m15si1876435igt.42.2015.
for <>
(version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
View gist:edb7b141f2d3f218af17
Received: by with SMTP id ut2csp3287972iec;
Thu, 30 Apr 2015 11:07:36 -0700 (PDT)
X-Received: by with SMTP id u30mr4764701yhu.194.1430417256557;
Thu, 30 Apr 2015 11:07:36 -0700 (PDT)
Return-Path: <>
Received: from ( [])
by with ESMTPS id uu4si5103474vdc.11.2015.
for <>
(version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128);
View gist:6ad15586c3caa2065028
var _ptq = _ptq || []; // define or reuse the queue
// pushing a "purchase" action which will be rewarded only once in a lifetime, this needs to be trigger onload.
_ptq.push(['purchase', {ref_id: <order number>}]);
View gist:b1edd837e34675829b96
<script type="text/javascript" charset="utf-8">
var _ptq = _ptq || [];
var _punchtab_settings = {
key: "<YOUR KEY>",
display: "tab",
position: {x:"left", y:"bottom"}
(function() {
var pt = document.createElement('script'); pt.type = 'text/javascript'; pt.async = true;
View gist:3824b9576c25d4a04626
from django.db import transaction
from django.contrib.sessions.models import Session
View sql
DELETE FROM `django_session` WHERE `session_key` IN ('96ef0d60c319ede132c8de8885f63c5a', '96e4626aa69d9985867ad5514a4c00cc', '96d5188056118a99c13855a7da02d028', '96d254a4813e1fdfe9913b59e65bf85a', '96d22e236088cf93731a827a61bbf6e0', '96c63f7119e82a2ca3729d3ae76d3d51', '96b8996dcf4c192947d7f2e64d4c2476', '96aec7a2bdd47bf4c895bfb7520a9ec0', '96ad2a6caf9243abee04cb49aadbfe8f', '96a626af0581bdfa4e7ce3d26dff80f2', '96a388927a42b1261ca6e1551748ef8f', '96a054fe6ed54db4e3e82dc2a4a3e63c', '969c5830a37344727d90e7d449d5eb19', '969738a65fe61061ddef4818bf3cf73f', '969660ba7c2f1f786136cd43d75b0a87', '969292457c962a0402edaab9056e07fa', '9691309b10360be90830023588ed94c1', '9680c9ce3c8d504d7a6eb42d226d178d', '96808b78ecf93c11a33fd31a6014f5d1', '966f9c2cf56baa92a2e2e982b66d2999', '966d7b13800a9cb3af5c8aefe4d6d460', '966158f2383cd635e299098b382fc40f', '965e0191b1aaa02f19b030bcdf58bfa2', '965025517f804893cd00ddd8ae30f99b', '964afb5803fb57ed7fe5072efd62d776', '962452ea8c07b5ce6caa4ab542af443a', '9612a172041940469c7b537197493a0d',
mehdimehdi / gist:8482929
Created Jan 17, 2014
Histogram exercise
View gist:8482929
Build a command line tool which takes a CSV file-like input, and creates an histogram in ASCII
data = [(0,1),
(2, 4),
(4, 2),
(3, 3)]
Each row in the CSV is data which helps build the histogram. The first value is the column #, the second value is the value of bar in the histogram.
You can’t perform that action at this time.