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 | |
class WebMoneyRequest | |
{ | |
public static $url = 'https://passport.webmoney.ru/xml/XMLGetWMIDInfo.aspx'; | |
private static $_instance = null; | |
public static function getInstance() |
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
"require": { | |
"ext-mbstring": "*" | |
} |
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 | |
abstract class Base extends \Eloquent | |
{ | |
/** | |
* Get a new query builder instance for the connection. | |
* | |
* @return Builder | |
*/ | |
protected function newBaseQueryBuilder() |
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
// 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; |
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
// 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; |
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
// 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; |
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
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 { |
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 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(); | |
} |
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
package utils | |
import ( | |
"encoding/json" | |
"io/ioutil" | |
"github.com/labstack/echo" | |
) | |
func BodyToJson(c echo.Context) (map[string]interface{}, error) { |
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
#!/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');" |
OlderNewer