To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
timer('2011-12-31', function(timeRemaining) { | |
console.log('Timer 1:', timeRemaining); | |
}); | |
// This will run every minute, instead of every second | |
timer('2012-12-31', function(timeRemaining) { | |
console.log('Timer 2:', timeRemaining); | |
}, 60000); |
#!/bin/bash | |
echo "Generating an SSL private key to sign your certificate..." | |
openssl genrsa -des3 -out myssl.key 1024 | |
echo "Generating a Certificate Signing Request..." | |
openssl req -new -key myssl.key -out myssl.csr | |
echo "Removing passphrase from key (for nginx)..." | |
cp myssl.key myssl.key.org | |
openssl rsa -in myssl.key.org -out myssl.key |
function insertAt(arr, val, i) { | |
arr.splice(i, 0, val); | |
} | |
function removeAt(arr, i) { | |
return arr.splice(i, 1).length === 1; | |
} | |
function genericInsertAt(arr, val, i) { | |
Array.prototype.splice.call(arr, i, 0, val); | |
} |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
<?php namespace Cavedwellerrich\MyPackage; | |
use Illuminate\Support\ServiceProvider; | |
use Illuminate\Foundation\AliasLoader; | |
class MyPackageServiceProvider extends ServiceProvider { | |
//... | |
public function register() |
<?php | |
class ExampleTest extends TestCase { | |
public function setUp() | |
{ | |
parent::setUp(); | |
DB::beginTransaction(); | |
} |
For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.
Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon
with HyperThreading enabled, but it can work without problem on slower machines.
You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.
Use Brew | |
> brew install libjpeg | |
find /usr | grep "libjpeg" | |
find /opt | grep "libjpeg" | |
Here what I have done |