Skip to content

Instantly share code, notes, and snippets.

@Vrtak-CZ
Vrtak-CZ / dynamicReturnTypeMeta.json
Last active August 29, 2015 14:16 — forked from hrach/dynamicReturnTypeMeta.json
Dynamic Return Type
{
"methodCalls": [
{
"class": "\\Slevomat\\Entity\\EntityManager",
"method": "create",
"position": 0
},
{
"class": "\\Slevomat\\Entity\\EntityManager",
"method": "getByPrimary",
@massahud
massahud / Portable Node.js andNPM on windows.md
Last active February 8, 2024 14:30
Portable Node.js and NPM on windows
  1. Get node binary (node.exe) from http://nodejs.org/download/
  2. Create the folder where node will reside and move node.exe to it
  3. Download the last zip version of npm from http://nodejs.org/dist/npm
  4. Unpack the zip inside the node folder
  5. Download the last tgz version of npm from http://nodejs.org/dist/npm
  6. Open the tgz file and unpack only the file bin/npm (without extension) directly on the node folder.
  7. Add the the node folder and the packages/bin folder to PATH
  8. On a command prompt execute npm install -g npm to update npm to the latest version

Now you can use npm and node from windows cmd or from bash shell like Git Bash of msysgit.

@ssokolow
ssokolow / index.php
Created July 6, 2012 03:39
Basic stub for mod_rewrite-like behaviour using PHP 5.4's development server
<?php
// To the extent possible under law, I (Stephan Sokolow) waive all copyright and related or
// neighbouring rights to this code snippet. (Though it'd still be nice if you mention me)
// If we're running under `php -S` with PHP 5.4.0+
if (php_sapi_name() == 'cli-server') {
// Replicate the effects of basic "index.php"-hiding mod_rewrite rules
// Tested working under FatFreeFramework 2.0.6 through 2.0.12.
$_SERVER['SCRIPT_NAME'] = str_replace(__DIR__, '', __FILE__);