Skip to content

Instantly share code, notes, and snippets.

View raagin's full-sized avatar
🎵

Yury Lapshinov raagin

🎵
View GitHub Profile
@irazasyed
irazasyed / outbound-email-with-cloudflare.md
Last active October 12, 2025 18:32
Using Gmail SMTP with Cloudflare Email Routing: A Step-by-Step Guide

Using Gmail SMTP with Cloudflare Email Routing: Step-by-Step Guide

Learn how to send emails through Gmail SMTP with Cloudflare Email Routing in this comprehensive guide.

Step 1: Enable 2-Factor Authentication

To proceed with this method, ensure that you have enabled two-factor authentication for your Google account. If you haven't done so already, you can follow the link to set it up → Enable 2FA in your Google account.

Step 2: Create an App Password for Mail

@lukin0110
lukin0110 / GulpReactBrowserifyBabelify.md
Last active October 26, 2020 00:36
Gulp + browserify + babelify + react

Use React with Gulp, Browserify and Babelify. This allows you to use React in jsx & node.js style. It let's you use require('module') in your JavaScript. Babelify will transform the jsx code to JavaScript code.

Development

gulp build-react

This will generate a main.min.js file in the build directory with sourcemaps.

Production

@JustOnce
JustOnce / utils.py
Last active August 13, 2024 08:56
Django stream file response with utf-8 name
from urllib import quote
from django.http import StreamingHttpResponse
def stream_file_response(file_name, file_path):
response = StreamingHttpResponse(open(file_path, 'rb'))
response['Content-Type'] = 'application/octet'
response['Content-Disposition'] = 'attachment; filename*=UTF-8\'\'%s' % quote(file_name)
response['Content-Description'] = 'File Transfer'
@xfenix
xfenix / base_site.html
Created September 5, 2012 14:22
Grappelli ckeditor simple integration with solved collapsable problem and django-filebrowser
{% extends "admin/base.html" %}
{% load i18n %}
{% block extrahead %}
<script type="text/javascript" src="/static/ckeditor/ckeditor.js"></script>
<script type="text/javascript">
grp.jQuery(function(){
config = {
'toolbar': [
[