Skip to content

Instantly share code, notes, and snippets.

@nlehuen
nlehuen / manymo.bat
Created October 11, 2012 15:14
Replacement for Manymo Command Line tool, see http://www.manymo.com/documentation/command-line-tool.html
@echo off
rem Replacement for Manymo Command Line tool
rem See http://www.manymo.com/documentation/command-line-tool.html
if "%1"=="tunnel" goto :TUNNEL
:ERROR
echo Commands :
echo manymo tunnel port:host:password
@nlehuen
nlehuen / prepare_php_session_folder.php
Created May 11, 2012 21:31
This script prepares the PHP session.save_path directory for spreading session files on multiple levels. It is a replacement for the infamous mod_files.sh script.
#!/usr/bin/php
<?php
// See http://www.php.net/manual/en/session.configuration.php#ini.session.save-path
function prepare_dir($base, $hash_chars, $depth, $number) {
if($depth<0) return $number;
if(!file_exists($base)) {
mkdir($base, 0777);
echo "$base\n";