Skip to content

Instantly share code, notes, and snippets.

View abdelouahabb's full-sized avatar

ALIANE Abdelouahab abdelouahabb

View GitHub Profile
#coding: utf-8
import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
class UnicodeHandler(tornado.web.RequestHandler):
<!DOCTYPE html>
<html>
<head>
<title>
ba3333
</title>
<meta charset="utf-8">
@abdelouahabb
abdelouahabb / arabic_tornado.py
Last active August 29, 2015 14:08
This is a gist how to use unicode as Tornado URLS (here i used arabic char)
#!/usr/bin/env python
#coding: utf-8
import tornado.ioloop
import tornado.web
import tornado.escape
#import urllib2 old way
arabic_word = u'السلام'
arab = tornado.escape.url_escape(arabic_word)
@abdelouahabb
abdelouahabb / tornado-hasher.py
Last active August 29, 2015 14:09
how to use tornado with password hashing, original link https://groups.google.com/forum/#!topic/python-tornado/35BiBKdSCNw
from concurrent.futures import ThreadPoolExecutor
from tornado import gen
from tornado.process import cpu_count
import bcrypt
# global threadpool
pool = ThreadPoolExecutor(cpu_count())
@gen.coroutine
def create_user(name, password):
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 14 23:01:24 2014
@author: Abdelouahab
"""
import hashlib
r = ''
@abdelouahabb
abdelouahabb / comparer.py
Created November 18, 2014 21:31
This is a simple script that do something like John the Ripper, it was a job that i was going to make to someone, he was not satisfacted, so i release it here ^_^
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 16 17:51:48 2014
@author: Abdelouahab
"""
import fileinput
import argparse
import time
import datetime
@abdelouahabb
abdelouahabb / gist:6911367
Last active August 8, 2017 04:19
simple script to get your fb friends
#coding: utf-8
'''
Petit script qui vous aide à récupérer la liste de vos amis ainsi que leurs liens au cas où vous avez été bloqué,
vous saisissez le lien dans un navigateur là où vous êtes déconnecté, si le lien marche, ce 'faux' ami vous a bloqué,
sinon, il a 'vraiment' désactivé son compte :D
et surtout, ne renommez pas ce fichier facebook.py sinon il va créer une interference avec la bibliothèque Facebook et il va essayer de s'importer lui même!
et quand vous trouvez quelques chose entre '' laissez la et remplacez que le contenu! c'est un type texte et non une variable!
copyleft: abdelouahab ;)
'''
@abdelouahabb
abdelouahabb / tornado_fb_poster.py
Last active May 11, 2018 07:10
this is how to post on your application page on facebook using only Tornado, no more libraries ;)
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import tornado.auth
import tornado.escape
import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.gen
@abdelouahabb
abdelouahabb / app.py
Last active November 7, 2019 11:44
Using SQLite with Tornado. just a simple code, tornado is easy, and if you want to make a simple application that runs on the same server, use this Gist for less dependecies ^_^
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import tornado.web
import tornado.httpserver
import tornado.ioloop
from tornado.options import define, options
import handlers
import os
@abdelouahabb
abdelouahabb / fbterm-hacks.md
Created January 18, 2021 02:50 — forked from zellio/fbterm-hacks.md
fbterm, installation and configuration hacks

fbterm setup and config hacks

Installation and setup

Install fbterm via your favorite package manager

pacman -S fbterm