Skip to content

Instantly share code, notes, and snippets.

View softquantum's full-sized avatar

Maxime softquantum

View GitHub Profile
@softquantum
softquantum / MeiliSearch.md
Created November 6, 2023 01:32 — forked from eliyas5044/MeiliSearch.md
MeiliSearch installation and configuration.

Taken from: http://michal.karzynski.pl/blog/2013/06/09/django-nginx-gunicorn-virtualenv-supervisor/

Setting up Django with Nginx, Gunicorn, virtualenv, supervisor and PostgreSQL

[Django][1] is an efficient, versatile and dynamically evolving web application development framework. When Django initially gained popularity, the recommended setup for running Django applications was based around Apache with mod_wsgi. The art of running Django advanced and these days the recommended configuration is more efficient and resilient, but also more complex and includes such tools as: Nginx, Gunicorn, virtualenv, supervisord and PostgreSQL.

In this text I will explain how to combine all of these components into a Django server running on Linux.

JQL Syntax for the Impatient

There are a few JQL syntax bits to get you started:

  • AND --- allows you to add qualifiers to a list
  • != Thing --- target one thing
  • is in (List, Of, Things) --- target a bunch of things (Done, Closed, Resolved) typically
  • not in (List, of, Things) --- do not include a bunch of things
  • -1w --- relative time. You can also use -1d for day
  • "2015/3/15" --- specific dates
@softquantum
softquantum / gist:97cd60757a5ac77643a7c8336dd442c1
Created February 4, 2023 13:55 — forked from seLain/gist:8bdf12c7196f3fccafdf067dec2696b2
Fix the thing GitHub keeps saying “This branch is X commits ahead, Y commits behind”
ref stackoverflow:
https://stackoverflow.com/questions/41283955/github-keeps-saying-this-branch-is-x-commits-ahead-y-commits-behind
works by
1. git remote add upstream https://github/upstream/repo.git
2. git pull --rebase upstream master
2.1 git rebase --skip (if the conflicts are not true, skip the patches)
3. git push --force-with-lease origin master
If there are branches to fix
@softquantum
softquantum / iTerm2.md
Created December 12, 2022 07:35 — forked from soifou/iTerm2.md
iTerm2 Shortcuts

iTerm2 Shortcuts

Tab navigation

  • open new tab: Cmd + t
  • next tab: Cmd + Shift + ]
  • previous tab: Cmd + Shift + [

Pane navigation

@softquantum
softquantum / example-azure-pipeline.yml
Created July 21, 2021 03:23 — forked from killertilapia/example-azure-pipeline.yml
An example Azure YML script for running django tests in an Azure pipeline.
trigger:
batch: true
branches:
include:
- develop
jobs:
- job: 'run_tests'
pool:
vmImage: 'Ubuntu-20.04'
@softquantum
softquantum / cmsContentType_Usage.sql
Created March 11, 2018 11:08 — forked from leekelleher/cmsContentType_Usage.sql
Umbraco - database analysis - SQL Queries
-- Copied from Hendy https://our.umbraco.org/forum/umbraco-7/using-umbraco-7/72814-creating-a-list-of-unused-doc-types#comment-233729
-- Find all unused docTypes
-- These results may contain docTypes that are masters of used ones, so need to exclude these too...
SELECT
A.nodeId as 'DocTypeId',
B.text AS 'Name',
A.alias AS 'Alias'
FROM
cmsContentType A LEFT JOIN
@softquantum
softquantum / 1-add-macros.php
Created February 17, 2018 17:16 — forked from adamwathan/1-add-macros.php
Multiformat Endpoints in Laravel
<?php
namespace App\Providers;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Support\ServiceProvider;
use App\Http\Middleware\CaptureRequestExtension;
class AppServiceProvider extends ServiceProvider
@softquantum
softquantum / 1.Summary.md
Created February 3, 2018 19:03 — forked from Vercoutere/1.Summary.md
Laravel 5 middleware class that sets a context in a multi-tenant app + updated version for easier testing with example testcase.
@softquantum
softquantum / texture_change.py
Created July 9, 2017 20:35 — forked from diramazioni/texture_change.py
blender python: texture change from command line
'''
texture image path are relative to the blend file directory. run from command line like this:
texture=img/2012720989_c.jpg blender -b mug.blend --python texture_change.py -F PNG -s 1 -e 1 -j 1 -t 0 -a
''''
import os
image_file = os.getenv('texture')
if not image_file:
image_file="img/2012720989_c.jpg"