Skip to content

Instantly share code, notes, and snippets.

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

Muhammad Taqi ArchTaqi

🏠
Working from home
View GitHub Profile
import time
import uuid
import redis
import datetime
import mongoengine as mongo
from mongoengine.django.auth import User
from socialq import log as logging
from django.core.mail import EmailMultiAlternatives
from django.template.loader import render_to_string
from django.core import mail
@lologhi
lologhi / 1.How to easily implement a REST API with oAuth2 presentation.md
Last active April 4, 2024 22:13
Symfony2 : How to easily implement a REST API with oAuth2 (for normal guys)

It's still a work in progress...

Intro

As William Durand was recently explaining in his SOS, he "didn't see any other interesting blog post about REST with Symfony recently unfortunately". After spending some long hours to implement an API strongly secured with oAuth, I thought it was time for me to purpose my simple explanation of how to do it.

Ok, you know the bundles

You might have already seen some good explanation of how to easily create a REST API with Symfony2. There are famous really good bundles a.k.a. :

sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo apt-get -y install git make python-dev python-setuptools libblas-dev gfortran g++ python-pip python-numpy python-scipy liblapack-dev
sudo pip install ipython nose
sudo apt-get install screen
sudo pip install --upgrade git+git://github.com/Theano/Theano.git
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1204/x86_64/cuda-repo-ubuntu1204_5.5-0_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1204_5.5-0_amd64.deb
sudo apt-get update
@staltz
staltz / introrx.md
Last active April 19, 2025 05:15
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 11, 2025 17:09
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@gridsane
gridsane / SwiftMailerHtmlHandler.php
Created April 14, 2014 08:06
Symfony + Monolog, sending logs to email
<?php
namespace Foo\Bar;
use Monolog\Handler\SwiftMailerHandler;
use Monolog\Logger;
/**
* SwiftMailerHtmlHandler uses Swift_Mailer to send emails with text/html body
*/
@josephmisiti
josephmisiti / gist:10489023
Last active March 2, 2023 13:36
Install Cloudera Impala On Ubuntu 12.04
  1. update apt-get
cd /etc/apt/sources.list.d/
wget http://archive.cloudera.com/impala/ubuntu/precise/amd64/impala/cloudera.list
sudo apt-get update
  1. Install Impala [found here [1]]
@bennylope
bennylope / custom_backends.py
Created March 11, 2014 20:32
Extending Django Organizations backends. Use mixin custom functionality to override default backends using your own application. This example takes an optional `connection` argument and passes it to `send_mail`.
from organizations.backends.defaults import RegistrationBackend, InvitationBackend
class SendMailMixin(object):
def _send_email(self, user, subject_template, body_template,
sender=None, connection=None, **kwargs):
"""Utility method for sending emails to new users"""
if sender:
from_email = "%s %s <%s>" % (sender.first_name, sender.last_name,
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 19, 2025 04:48
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k