$ sudo mv supervisor /etc/init.d
$ sudo chkconfig --add supervisor
$ sudo chkconfig supervisor on
This file contains 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
Options +FollowSymLinks | |
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^ /index.php [L] |
This file contains 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
MagickWand *image; | |
int num_args; | |
double args[1] = {.5}; // scale the image to half size | |
double args[1] = {45}; // rotate the image 45 degrees from the center | |
double args[2] = {.5, 45}; // scale and rotate image | |
double args[3] = {0, 0, 45}; // rotate the image from 0,0 | |
double args[4] = {0, 0, .5, 45}; // rotate and scale image | |
double args[6] = {0, 0, .5, 45, 50, 50}; // rotate, scale and translate image to 50,50 |
This file contains 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 | |
function validateNif($nif) { | |
$nifRegEx = '/^[0-9]{8}[A-Z]$/i'; | |
$nieRegEx = '/^[XYZ][0-9]{7}[A-Z]$/i'; | |
$letras = "TRWAGMYFPDXBNJZSQVHLCKE"; | |
if (preg_match($nifRegEx, $nif)) { | |
return ($letras[(substr($nif, 0, 8) % 23)] == $nif[8]); | |
} else { | |
if (preg_match($nieRegEx, $nif)) { |
This file contains 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
app.directive('myEnter', function () { | |
return function (scope, element, attrs) { | |
element.bind("keydown keypress", function (event) { | |
if(event.which === 13) { | |
scope.$apply(function (){ | |
scope.$eval(attrs.myEnter); | |
}); | |
event.preventDefault(); | |
} |
This file contains 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 namespace App\Libraries; | |
use GuzzleHttp\Client; | |
class PushLibrary { | |
protected $users; | |
protected $title; | |
protected $data; |
This file contains 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 | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
class MakeAngularComponent extends Command | |
{ | |
/** | |
* The name and signature of the console command. |
This file contains 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
<IfModule mod_rewrite.c> | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
</IfModule> | |
<IfModule mod_setenvif.c> | |
SetEnvIf X-Forwarded-Proto "^https$" HTTPS | |
</IfModule> |
This file contains 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
{ | |
"us": "https://www.amazon.com", | |
"uk": "https://www.amazon.co.uk", | |
"ca": "https://www.amazon.ca", | |
"de": "https://www.amazon.de", | |
"es": "https://www.amazon.es", | |
"fr": "https://www.amazon.fr", | |
"it": "https://www.amazon.it", | |
"jp": "https://www.amazon.co.jp", | |
"in": "https://www.amazon.in", |
This file contains 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
[ | |
{ | |
"name": "Afghanistan", | |
"code": "AF" | |
}, | |
{ | |
"name": "Åland Islands", | |
"code": "AX" | |
}, | |
{ |
OlderNewer