Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
#GPG=gpg
# or
GPG=gpg2
# Create test keys in `original_gnupg_test_home` folder
mkdir original_gnupg_test_home 2>/dev/null
cd original_gnupg_test_home
@anton-ryzhov
anton-ryzhov / wsgiserver.py
Created June 20, 2014 08:27
WSGIContainer vs ExecutorWSGIContainer
#!/usr/bin/env python
# Setup config below
# Call simultaneously some:
# $ curl http://localhost:8888/
import random
import sys
@anton-ryzhov
anton-ryzhov / example.txt
Created August 15, 2012 07:33
js include / make
<script src="js/main.js" id="script_include" type="text/javascript"></script>
=>
<script src="js/main.js" id="script_include" type="text/javascript"></script>
<script src="js/less-1.3.0.js" type="text/javascript"></script>
<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
<script src="js/jquery-ui.js" type="text/javascript"></script>
user@domain:~/js$ node main.js > out
==
@anton-ryzhov
anton-ryzhov / servers
Created March 23, 2012 20:38
node.js async test
Files:
mkfifo pipe pipe2
pv -L 3M /dev/zero > pipe
pv -L 3M /dev/zero > pipe2
ps -AL | grep node
Socket:
@anton-ryzhov
anton-ryzhov / webResponse.class.php
Created February 1, 2012 07:34
Content-Disposition with encoding fix for Firefox
<?php
public function contentDispose($type, $name=null)
{
$header=$type;
if ($name)
{
// Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=588409
$isFF=(strpos(strtolower($_SERVER['HTTP_USER_AGENT']), 'firefox') !== false);