This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
createTRPCClient, | |
httpBatchLink, | |
loggerLink, | |
splitLink, | |
unstable_httpSubscriptionLink, | |
} from '@trpc/client'; | |
import type { AppRouter } from './server.ts'; | |
async function delay(ms: number) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If this command is not found then do this: sudo apt-get install python-software-properties | |
sudo add-apt-repository ppa:mapnik/boost | |
wget -O - http://dl.hhvm.com/conf/hhvm.gpg.key | sudo apt-key add - | |
echo deb http://dl.hhvm.com/ubuntu precise main | sudo tee /etc/apt/sources.list.d/hhvm.list | |
sudo apt-get update | |
sudo apt-get install hhvm | |
# If you are getting segfaults | |
sudo apt-get install hhvm-dbg | |
# Living on the edge (rebuilt everyday, unstable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get remove rabbitmq-server | |
sudo apt-get install python-software-properties | |
sudo add-apt-repository "deb http://www.rabbitmq.com/debian/ testing main" | |
wget http://www.rabbitmq.com/rabbitmq-signing-key-public.asc | |
sudo apt-key add rabbitmq-signing-key-public.asc | |
sudo apt-get update | |
sudo apt-get install rabbitmq-server -y | |
sudo service rabbitmq-server start | |
sudo rabbitmq-plugins enable rabbitmq_management | |
sudo service rabbitmq-server restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ curl -s http://getcomposer.org/installer | php | |
$ sudo mv composer.phar /usr/local/bin/composer.phar | |
And if you're even more lazy, like me, you can create an alias: | |
$ alias composer='/usr/local/bin/composer.phar' | |
This way you can invoke composer with just composer | |
Update: Composer now offers another method as well on the website: | |
$ curl -sS https://getcomposer.org/installer | php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function testGetPhpBufferReturns() | |
{ | |
$buffer = 'alien=Foo&ship=Variant&galaxy=Milky Way&constellation=Ursa%20Major&planet'; | |
$request = new \Classes\Phalcon\Request(); | |
$request->setBufferObject(new \Test\Classes\Phalcon\Request\Buffers\Mock($buffer)); | |
$obtainedData = $request->obtainPutData(); | |
$this->assertArrayHasKey('alien', $obtainedData); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install ppa-purge | |
#Then remove the PPA. All packages you installed from this PPA get removed too! | |
sudo ppa-purge ppa:ondrej/php5 | |
#Removing current php5 | |
sudo apt-get remove php5 php5-cli php5-common | |
#Install the official packages from ubuntu again: | |
sudo apt-get install php5 php5-cli php5-common # ... other PHP 5.3 stuff |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('ROOT_PATH', __DIR__.'/../'); | |
define('APP_PATH', ROOT_PATH.'app/'); | |
// Registering an auto-loader | |
$loader = new \Phalcon\Loader(); | |
$loader->registerNamespaces( | |
array( |