Skip to content

Instantly share code, notes, and snippets.

Daniele Faraglia joke2k

Block or report user

Report or block joke2k

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
import base64
from Crypto.Cipher import DES3
import re
import os
passwords = []
def get_secret():
global secret
joke2k /
Last active Jun 26, 2018
Script to extract emojis from and create faker provider. [requires: requests-html]
import sys
from pprint import pformat
from requests_html import HTMLSession
session = HTMLSession()
url = ''
r = session.get(url)
joke2k / get-browser-language.php
Last active Jan 29, 2019 — forked from LucaRosaldi/get-browser-language.php
PHP: Detect Browser Language
View get-browser-language.php
* Get browser language, given an array of avalaible languages.
* @param [array] $availableLanguages Avalaible languages for the site
* @param [string] $default Default language for the site
* @return [string] Language code/prefix
function get_browser_language( $available = [], $default = 'en' ) {
if ( isset( $_SERVER[ 'HTTP_ACCEPT_LANGUAGE' ] ) ) {
joke2k /
Created Jun 5, 2018
standard django settings VS django-environ
import os
DEBUG = True
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'database',
'USER': 'user',
'PASSWORD': 'githubbedpassword',
'HOST': '',

Keybase proof

I hereby claim:

  • I am joke2k on github.
  • I am joke2k ( on keybase.
  • I have a public key ASALZx_HksGhiBKTqhXkkqM5E_kCtZPnCT76faiqWhcKPAo

To claim this, I am signing this object:

joke2k / TranslateSerializer
Created Sep 9, 2014
Django Rest Framework Translated
View TranslateSerializer
class TranslateSerializer(serializers.ModelSerializer):
def __init__(self, *args, **kwargs):
super(TranslateSerializer, self).__init__(*args, **kwargs)
self.translate_fields = getattr(self.Meta, 'translate_fields', ())
if kwargs.get('context', None):
self.lang = utils.get_request_language(kwargs['context'].get('request', None))
def to_native(self, obj):
View gist:3539e9251383b53af4a0
Verifying myself: My Bitcoin username is +joke2k.
You can’t perform that action at this time.