composer config -g github-oauth.github.com <oauthtoken>
This shit really needs to be documented somewhere.
nameserver 127.0.0.1 | |
port 53535 |
#!/usr/bin/env python | |
import sys, os, re | |
from subprocess import check_output | |
# Collect the parameters | |
commit_msg_filepath = sys.argv[1] | |
if len(sys.argv) > 2: | |
commit_type = sys.argv[2] | |
else: |
composer config -g github-oauth.github.com <oauthtoken>
This shit really needs to be documented somewhere.
<?php | |
namespace app\models; | |
/** | |
* This is the ActiveQuery class for [[User]]. | |
* @see User | |
*/ | |
class UserQuery extends \yii\db\ActiveQuery | |
{ | |
/** |
server { | |
listen 80; | |
server_name domain.com; | |
root /var/www/domain.com; | |
location ~ /.well-known { | |
allow all; | |
} | |
location ~ /\.ht { |
<?php | |
// $arr1 | |
Array | |
( | |
[a] => 1 | |
[b] => 2 | |
[c] => 3 | |
) | |
// $arr2 |
<?php | |
// Stored in session | |
Url::remember(['brands/vanity-iew', 'brand' => $brand->vanity_url], 'return-url'); | |
// Redirect if exist | |
if (Url::previous('return-url')) { | |
return $this->redirect(Url::previous('return-url')); | |
} |
<?php | |
$interval = 'DAY'; | |
//$interval = 'WEEK'; | |
//$interval = 'MONTH'; | |
$brands = BrandExt::find() | |
->where([ | |
'between', | |
'brand.created_at', | |
new Expression(sprintf('date_sub(utc_timestamp, interval 1 %s)', $interval)), |
<?php | |
class DistanceHelper { | |
/** | |
* @param string | float $from | |
* @param string | float $to | |
* | |
* @return object | |
*/ | |
public static function calculate($from, $to) { |
<?php | |
// Global in config/web.php | |
'components' => [ | |
// ... | |
'assetManager' => [ | |
'forceCopy' => YII_DEBUG, | |
], | |