Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
curl -XPUT http://localhost:9200/test_index/ -d ' | |
{ | |
"index": { | |
"analysis": { | |
"analyzer": { | |
"index_analyzer": { | |
"tokenizer": "nGram", | |
"filter": ["lowercase", "snowball"] | |
}, |
@echo off | |
REM place this in C:\ and install teamviewer.reg below. Then you should be able to | |
REM openteamviewers from the webbrowser with teamviewer://1234 | |
set protocolString=%1 | |
REM uncomment below for testing | |
REM set protocolString="teamviewer://795143153" | |
set protocolString=%protocolString:"=% |
Awesome PHP has been relocated permanently to its own Github repository. No further updates will made to this gist.
Please open an issue for any new suggestions.
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
arm64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant::Config.run do |config| | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "centos64-min" | |
# The url from where the 'config.vm.box' box will be fetched if it | |
# doesn't already exist on the user's system. | |
config.vm.box_url = "http://dl.dropbox.com/u/9227672/CentOS-6.0-x86_64-netboot-4.1.6.box" |
MOCKING DATABASE OPERATIONS | |
=========================== | |
In our webreg example, we refactored some code so that we could | |
pass in our database object instead of creating it inside. Let's | |
push that further and show a slightly advanced usage of a mock | |
object. | |
So let's rework our Franchise test to use a mocked database connection. |
#!/usr/bin/php | |
<?php | |
/** | |
* .git/hooks/pre-commit | |
* | |
* This pre-commit hooks will check for PHP error (lint), and make sure the code | |
* is PSR compliant. | |
* | |
* Dependecy: PHP-CS-Fixer (https://github.com/fabpot/PHP-CS-Fixer) | |
* |
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
This configuration is a working copy which I have tested on Apache 2.2.x and 2.4.x | |
I highly recommend you use this version of mod_fastcgi as it works with Apache 2.4.x, fastcgi.com version does not! | |
https://github.com/ByteInternet/libapache-mod-fastcgi | |
The fastcgi.com version is 2.4.6, the version I am recommending registers as 2.4.7 | |
To patch mod_fastcgi for use with Apache 2.4.x look at the debian/patches folder. It's not specific to Debian OS so don't let that fool you. I personally use Archlinux. | |
Of course to compile mod_fastcgi: |