Skip to content

Instantly share code, notes, and snippets.

@kamotos
kamotos / local_environment_settings.py
Created March 6, 2019 21:07
local_environment_settings.py
DEFAULT_FILE_STORAGE = 'storages.backends.s3boto.S3BotoStorage'
AWS_ACCESS_KEY_ID = ''
AWS_SECRET_ACCESS_KEY = ''
AWS_STORAGE_BUCKET_NAME = ''
#CLOUDINARY
CLOUDINARY = {
'cloud_name': '',
@kamotos
kamotos / resume.json
Last active October 24, 2023 15:56
Anas ZAHIM resume
{
"basics": {
"name": "Anas Zahim",
"label": "Backend Engineer",
"picture": "https://about.me/cdn-cgi/image/q=40,dpr=2,f=auto,fit=cover,w=200,h=200,gravity=0.626x0/https://assets.about.me/background/users/a/n/a/anass_1464884470_4.jpg",
"email": "anas@zah.im",
"phone": "+33756991796",
"website": "https://anas.zah.im",
"summary": "Backend Engineer, DevOps/Infrastructure enthusiast, Full-stack when necessary. I have experience in all stages of the product engineering cycle : System Design and Architecture, implementation, testing, deployment and monitoring and observability.",
"location": {

Keybase proof

I hereby claim:

  • I am kamotos on github.
  • I am anass (https://keybase.io/anass) on keybase.
  • I have a public key whose fingerprint is EDE1 2091 C95B 9113 CEB9 BB68 5A7B F94F 14AE A137

To claim this, I am signing this object:

@kamotos
kamotos / friendryde-api-documentation.md
Last active September 16, 2015 16:44
FriendRyde API documentation

FORMAT: 1A HOST: http://api.friendryde.com

FriendRyde

This is the official documentation of the FriendRyde service to be used by the iOS and Android apps.

Requests Authorization header

Beside signup resources, all others endpoints must be request with an Authorization header. Example:

Authorization: Token 6d37107fccd2db239a2386b791b7fdf9adc17915

@kamotos
kamotos / requirements
Created December 5, 2014 16:54
Text extraction
beautifulsoup4==4.3.2
python-readability
requests
@kamotos
kamotos / mixins.py
Created March 11, 2014 17:16
Django Facebook Mixins
from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import redirect
from django.utils.decorators import method_decorator
from fandjango.decorators import facebook_authorization_required
facebook_redirect_uri = 'https://www.facebook.com/pages/{page_name_id}?sk=app_{app_id}'.format(
page_name_id=settings.FACEBOOK_PAGE_NAME_ID,
@kamotos
kamotos / .bashrc
Last active May 15, 2021 11:15
.dotfiles
if [ -f /etc/bash_completion.d/docker.io ]; then
source /etc/bash_completion.d/docker.io
fi
# python
# cdp <python module name> to get in the directory where the module is defined. This work:
# Seen here https://github.com/njharman/dotfiles/blob/master/.bashrc#L44
cdp () {
cd "$(python -c "import os.path as _, ${1}; \
@kamotos
kamotos / id2_id.js
Last active December 24, 2015 07:19
use socialiq;
var documents_count = 0;
db.crawler_users.find({_id: {$type: 7}}).forEach(function(doc){
documentsCount++;
var sleepTime = (documentsCount % 10) ? 1000 : 0;
setTimeout(function(){
var id=doc._id;
doc._id=doc.id;
db.crawler_users.remove({_id:id});
db.crawler_users.insert(doc);
@kamotos
kamotos / fandjango.views.py
Created May 23, 2012 17:34
Compatibility with Django 1.2
from urllib import urlencode
from django.http import HttpResponse
from django.shortcuts import render_to_response
from django.template import RequestContext
from fandjango.models import User
from fandjango.settings import (
FACEBOOK_APPLICATION_ID, FACEBOOK_APPLICATION_DOMAIN,
FACEBOOK_APPLICATION_NAMESPACE, FACEBOOK_APPLICATION_SECRET_KEY,