Skip to content

Instantly share code, notes, and snippets.

Avatar

Maks Balashov smilemakc

  • indev-group
View GitHub Profile
@smilemakc
smilemakc / example.cs
Created Sep 28, 2017 — forked from brandonmwest/example.cs
Generating base64-encoded Authorization headers in a variety of languages
View example.cs
httpClient.DefaultRequestHeaders.Authorization =
new AuthenticationHeaderValue(
"Basic",
Convert.ToBase64String(
System.Text.ASCIIEncoding.ASCII.GetBytes(
string.Format("{0}:{1}", username, password))));
@smilemakc
smilemakc / nginx-uwsgi-python3
Created Dec 22, 2016 — forked from simoncoulton/nginx-uwsgi-python3
Setting up Nginx, uWSGI & Python3
View nginx-uwsgi-python3
======================================
Setting up Nginx, uWSGI and Python3
======================================
First off, I'm traditionally a PHP developer, but am looking at moving across to Python. I really struggled to find decent documentation on how to get a server up and running for deploying Python web applications from the point of view of someone coming from PHP. The main problems I came across with documentation were:
1) Only showed you how to run the server for a single web application.
2) Only showed you how to configure the app, not the server it was running on.
My preferred workflow for development is by setting up a new VM in VMware Fusion and then forwarding through all requests to that VM via /etc/hosts. This might not be the optimal way to get things up and running, but it works for me.
@smilemakc
smilemakc / auto_add_migrations.xml
Created Dec 21, 2016 — forked from fhanspach/auto_add_migrations.xml
A custom File Watcher for PyCharm to automatically add migrations in django projects
View auto_add_migrations.xml
<?xml version="1.0" encoding="UTF-8"?>
<TaskOptions>
<TaskOptions>
<option name="arguments" value="add $FileDir$/$FileName$" />
<option name="checkSyntaxErrors" value="true" />
<option name="description" value="auto add migrations" />
<option name="exitCodeBehavior" value="ERROR" />
<option name="fileExtension" value="py" />
<option name="immediateSync" value="true" />
<option name="name" value="migrations" />
You can’t perform that action at this time.