docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
| <?php | |
| namespace app\commands; | |
| use yii\console\Controller; | |
| use yii\db\ColumnSchema; | |
| class PhpDocController extends Controller | |
| { | |
| public function actionIndex() |
| #!/bin/bash | |
| php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php | |
| php -r "if (hash_file('SHA384', 'composer-setup.php') === '7228c001f88bee97506740ef0888240bd8a760b046ee16db8f4095c0d8d525f2367663f22a46b48d072c816e7fe19959') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
| php composer-setup.php | |
| php -r "unlink('composer-setup.php');" |
| package utils | |
| import ( | |
| "encoding/json" | |
| "io/ioutil" | |
| "github.com/labstack/echo" | |
| ) | |
| func BodyToJson(c echo.Context) (map[string]interface{}, error) { |
| <?php | |
| function dumpQuery(\yii\db\ActiveQuery $query) | |
| { | |
| echo '<pre>'; | |
| var_export($query->prepare(\Yii::$app->db->queryBuilder)->createCommand(\Yii::$app->db)->rawSql); | |
| echo '</pre>'; | |
| Yii::$app->end(); | |
| } |
| const ( | |
| twilioAuth = "Basic {base64}" // https://www.twilio.com/docs/quickstart/php/lookups | |
| ) | |
| // doTwilioCheck returns true if exists | |
| func doTwilioCheck(number string) (exists bool, err error) { | |
| url := fmt.Sprintf("https://lookups.twilio.com/v1/PhoneNumbers/%s", number) | |
| req, err := http.NewRequest("GET", url, nil) | |
| if err != nil { |
| // file /Users/kotchuprik/Projects/Work/project/nginx.conf | |
| server { | |
| listen 80; | |
| server_name webto.local webto.ru 192.168.0.100 localhost; | |
| client_max_body_size 20M; | |
| access_log /Users/kotchuprik/Projects/Work/project/access.log; |
| // file ~/Projects/projects.conf | |
| include /Users/kotchuprik/Projects/Work/project/nginx.conf; | |
| include /Users/kotchuprik/Projects/Freelance/project1/nginx.conf; | |
| include /Users/kotchuprik/Projects/Freelance/project2/nginx.conf; |
| // file /usr/local/etc/nginx.conf | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| sendfile on; | |
| keepalive_timeout 130; | |
| proxy_buffers 8 64k; | |
| proxy_buffer_size 128k; |
| <?php | |
| abstract class Base extends \Eloquent | |
| { | |
| /** | |
| * Get a new query builder instance for the connection. | |
| * | |
| * @return Builder | |
| */ | |
| protected function newBaseQueryBuilder() |