These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.
Install Mcrypt using Homebrew and PECL (comes with PHP)
# PHP 7.3
These steps should have been mentioned in the prerequisites of the Laravel Installation Guide, since I'm surely not the only person trying to get Laravel running on macOS.
Install Mcrypt using Homebrew and PECL (comes with PHP)
# PHP 7.3
/* | |
* Decide on your cache-busting strategy. In this example, we use the current timestamp, which will | |
* force a change every time the app is visited, but not every time the partial is loaded within a | |
* visit. Even better would be to use a hash of the file's contents to ensure that the file is always | |
* reloaded when the file changes and never reloaded when it isn't. | |
*/ | |
var cacheBustSuffix = Date.now(); | |
// Optionally, expose the cache busting value as a constant so other parts of your app can use it. | |
ngModule.constant("cacheBustSuffix", cacheBustSuffix); |
To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo
if you're logged in as root.
Edit /etc/ssh/sshd_config
and make sure to add the following at the end of the file:
Match group filetransfer
ChrootDirectory %h
false
as "0"
, so you want to typecast them.$hidden
array then OOPS!/users/id/5/active/true
. Your API does not need to be SEO optimised.?format=xml
is stupid, use an Accept: application/xml
header. I added this to the CodeIgniter Rest Server once for lazy people, and now people think it's a thing. It's not.<?php | |
/* | |
This function saved my life. | |
found on: http://www.sitepoint.com/forums//showthread.php?t=438748 | |
by: crvandyke | |
It takes an object, and when all else if/else/recursive functions fail to convert the object into an associative array, this one goes for the kill. Who would'a thunk it?! | |
*/ | |
$array = json_decode(json_encode($object), true); |
In early November, 2012, Apple issued a graphics update for all mid-2012 MacBooks. In a continued streak of stupidity, however, this update forces your Mac to use "Safe Sleep". This means that the entire contents of your RAM is written to your disk every time you put your Mac to sleep. | |
This is retarded on the scale of the Titanic's navigational plan for two reasons: | |
1) Your Mac likely has 8 or 16GB of RAM. This is a ton of wasted disk space; especially on MacBook Airs that ship with only 256GB SSDs to begin with. | |
2) SSDs wear out as you write to them. Each cell of a SSD can only be written to a certain number of times before it becomes read-only. If you put your computer to sleep many times a day, OS X is slowly but surely destroying your SSD with unneeded write cycles. | |
Worst of all, the graphics update makes it IMPOSSIBLE to turn off safe sleep using the standard approach you'll find on Google: |
Aromino Lu | |
Farlos Gabate | |
Kukog Gracux | |
Cassunex De 90C | |
Alex Nede | |
Jeerra Bylentron | |
Eddeysive | |
Fair Figo | |
Andries Gamper | |
Ladewenteah |
<!doctype html> | |
<html ng-app="myApp"> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.5/angular.min.js"></script> | |
</head> | |
<body> | |
<div ng-controller="TodoCtrl"> | |
<button ng-click="beQuickOrBeDead()">Fetch with 100ms timeout</button> | |
<button ng-click="neverEndingStory()">Fetch with default timeout</button> |
alias fp="echo -e ' _______...\n .-‘”..........``~.\n ,.-”..................“-.\n ,/........................”:\n ,?............................\ \n /..............................,}\n /...........................,:\`^\`.}\n /..........................,:”..../\n ?...__......................:\`...../\n /__.(...“~-,_.............,:\`...../\n /(_..”~,_....“~,_..........:\`...._/\n {._$;_...”=,_....“-,_...-~/~},.~”/.}\n ((...*~_....”=-._...“;,./\`./”...../\n \\\`~,...“~.,..........\`...}....../\n (..\`=-,,....\`............(...\_,-”\n /.\`~,...\`-................\\../^\\ \n \\\`~.*-,...................|/...\,__\n,,_ }.>-._\..................|........\`=~-,.. \n...\`=~-,_\\_...\`\\,.................\\.............. \n..........\`=~-,,.\\,................\\............. \n................\`:,,..............\`\\.......__.... \n...................\`=-,..........,%\`>-- |
<?php | |
/** | |
* Compare version numbers of the format X.Y.Z where X,Y,Z are non-negative integers | |
* Values with less than three parts will be padded out with zeros, eg. "1.1" becomes "1.1.0", "1" becomes "1.0.0" | |
* | |
* @return 1 if $a is greater (a later version) than $b, 0 if $a is equal to $b, -1 if $a is less (an earlier version) than $b | |
* | |
*/ | |
function version_cmp($a, $b) { |