Skip to content

Instantly share code, notes, and snippets.

View gen.sh
#!/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 Jun 20, 2014
WSGIContainer vs ExecutorWSGIContainer
View wsgiserver.py
#!/usr/bin/env python
# Setup config below
# Call simultaneously some:
# $ curl http://localhost:8888/
import random
import sys
View example.txt
<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 Mar 23, 2012
node.js async test
View servers
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 Feb 1, 2012
Content-Disposition with encoding fix for Firefox
View webResponse.class.php
<?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);