Look for httpd.conf
and add the following line at the bottom:
IncludeOptional "c:/amp/vhosts/*"
Now, go to c:/amp/vhosts
and create a file named vhosts.conf
.
# If you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
# ~/code/web:beta_directory$ git checkout master | |
# Switched to branch "master" | |
# ~/code/web:master$ git checkout beta_directory | |
# Switched to branch "beta_directory" |
<?php | |
/** | |
* Check to see if a given integer is prime. | |
* | |
* Adapted from this Python implementation http://pthree.org/2007/09/05/prime-numbersin- python/ | |
* This list of the first 10,000 prime numbers is also helpful http://primes.utm.edu/lists/small/10000.txt | |
* | |
* @param int $number the number to check to see if it is prime. | |
* @return boolean true if the number is prime, false if not. |
<?php | |
namespace Acme\DemoBundle\Security\Service; | |
use Symfony\Component\Security\Core\Encoder\PasswordEncoderInterface; | |
use Hautelook\Phpass\PasswordHash; | |
/** | |
* A password encoder that uses Phpass for encoding |
<!DOCTYPE html> | |
<meta charset=utf-8 /> | |
<title>Defining JavaScript functions, the ES6 way</title> | |
<h1>Defining JavaScript functions, the ES6 way</h1> | |
<em>Use Firefox 22 (Firefox Nightly)</em> | |
<script> |
class FormErrorsSerializer { | |
public function serializeFormErrors(\Symfony\Component\Form\Form $form, $flat_array = false, $add_form_name = false, $glue_keys = '_') | |
{ | |
$errors = array(); | |
$errors['global'] = array(); | |
$errors['fields'] = array(); | |
foreach ($form->getErrors() as $error) { | |
$errors['global'][] = $error->getMessage(); |
<?php | |
namespace Infun\HttpFoundation\File; | |
use Symfony\Component\HttpFoundation\File\File; | |
class ApiUploadedFile extends File | |
{ | |
public function __construct($base64Content) |
<?php | |
$a = new A(); | |
$reflection = new \ReflectionClass($a); | |
$property = $reflection->getProperty('privateProperty'); | |
$property->setAccessible(true); | |
$property->setValue($a, 'new-value'); | |
echo $a->getPrivateProperty(); | |
//outputs: |
This entire guide is based on an old version of Homebrew/Node and no longer applies. It was only ever intended to fix a specific error message which has since been fixed. I've kept it here for historical purposes, but it should no longer be used. Homebrew maintainers have fixed things and the options mentioned don't exist and won't work.
I still believe it is better to manually install npm separately since having a generic package manager maintain another package manager is a bad idea, but the instructions below don't explain how to do that.
Installing node through Homebrew can cause problems with npm for globally installed packages. To fix it quickly, use the solution below. An explanation is also included at the end of this document.
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |