Install with git git clone https://gist.github.com/85942af486eb79118467.git ~/Pictures/wallpapers
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 | |
if (!function_exists('mb_ucwords')) | |
{ | |
function mb_ucwords($str) | |
{ | |
return mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); | |
} | |
} |
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
// add this to your API controller in Yii | |
public function actionPreflight() { | |
$content_type = 'application/json'; | |
$status = 200; | |
// set the status | |
$status_header = 'HTTP/1.1 ' . $status . ' ' . $this->_getStatusCodeMessage($status); | |
header($status_header); | |
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
class Semver { | |
constructor(major, minner, patch) { | |
this.major = major; | |
this.minner = minner; | |
this.patch = patch; | |
} | |
toString() { | |
return `${this.major}_${this.minner}_${this.patch}`; | |
} |