For excessively paranoid client authentication.
Updated Apr 5 2019:
because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.
some other notes:
upstream uwsgi { | |
ip_hash; | |
server 127.0.0.1:40000; | |
} | |
server { | |
listen 80; | |
server_name www.domain.com; | |
root /sites/mysite/; | |
access_log /sites/mysite/log/nginx/access.log; |
[ | |
{ "keys": ["ctrl+shift+x"], "command": "tidy_xml" }, | |
{ "keys": ["ctrl+shift+j"], "command": "prettify_json" } | |
] |
# -*- coding: utf-8 -*- | |
from django.contrib.auth.decorators import login_required | |
from django.utils.cache import patch_response_headers | |
from django.utils.decorators import method_decorator | |
from django.views.decorators.cache import cache_page, never_cache | |
from django.views.decorators.csrf import csrf_exempt | |
class NeverCacheMixin(object): | |
@method_decorator(never_cache) |
#!/usr/bin/env ruby -w | |
# pnginator.rb: pack a .js file into a PNG image with an HTML payload; | |
# when saved with an .html extension and opened in a browser, the HTML extracts and executes | |
# the javascript. | |
# Usage: ruby pnginator.rb input.js output.png.html | |
# By Gasman <http://matt.west.co.tt/> | |
# from an original idea by Daeken: http://daeken.com/superpacking-js-demos |
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
[ | |
{ "keys": ["ctrl+alt+up"], "command": "smart_select_lines", "args": {"forward": false} }, | |
{ "keys": ["ctrl+alt+down"], "command": "smart_select_lines", "args": {"forward": true} } | |
] |
var casper = require('casper').create(); | |
var utils = require('utils'); | |
var phpMyAdminUrl = casper.cli.args[0]; | |
var phpMyAdminCredentials = { | |
pma_username: casper.cli.options.user, | |
pma_password: casper.cli.options.password | |
}; | |
if (!phpMyAdminUrl || !phpMyAdminCredentials.pma_username || !phpMyAdminCredentials.pma_password) { | |
casper.echo('Invalid parameters. Usage: casperjs monitor_slave.js http://example.com/phpMyAdmin --user=foo --password=bar'); |
# run this as root | |
while [ 1 ]; do echo | nc -l -U /tmp/reload_nginx && /etc/init.d/nginx reload; done | |
# or as an upstart job | |
script | |
echo | nc -l -U /tmp/reload_nginx && /etc/init.d/nginx reload | |
end script | |
respawn | |
# now any process can run this or do the equivalent with sockets to trigger reload |