Skip to content

Instantly share code, notes, and snippets.

View Sekaiichi's full-sized avatar
I may be slow to respond.

Mehrubon Sekaiichi

I may be slow to respond.
View GitHub Profile
@Sekaiichi
Sekaiichi / 0_reuse_code.js
Created December 31, 2015 18:02
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@Sekaiichi
Sekaiichi / Created by asad technologies.html
Last active February 19, 2017 10:54
Created by asad technologies
<span class="asad">
Сделано с <i class="fa fa-heart pulse"></i> в <a href="http://asad.tj" target="_blank">Asad Technologies</a>
</span>
@Sekaiichi
Sekaiichi / bootstrap_ms.css
Created March 21, 2017 10:16 — forked from firepol/bootstrap_ms.css
updated max-width: 767px to avoid breaking the existing behavior on col-sm
.col-ms-1,
.col-ms-2,
.col-ms-3,
.col-ms-4,
.col-ms-5,
.col-ms-6,
.col-ms-7,
.col-ms-8,
.col-ms-9,
.col-ms-10,
@Sekaiichi
Sekaiichi / encrypt_and_decrypt.php
Created May 6, 2018 11:55
encrypt and decrypt php
<?php
function dec_enc($action, $string) {
$output = false;
$encrypt_method = "AES-256-CBC";
$secret_key = 'This is my secret key';
$secret_iv = 'This is my secret iv';
// hash
$key = hash('sha256', $secret_key);
@Sekaiichi
Sekaiichi / Nginx-1.12_vhost.conf
Created July 25, 2018 10:38
Yii2 basic ngnix OSPanel(OpenServer) cofiguration
#-----------------------------------------------#
# ������ ����� ������������ �����
#-----------------------------------------------#
server {
listen %ip%:%httpport%;
listen %ip%:%httpsport% ssl;
server_name %host% %aliases%;
root "%hostdir%/web";
<?php
$dbh = new \PDO('oci:dbname=' . "(DESCRIPTION =(ADDRESS = (PROTOCOL= TCP)(Host= host)(Port= port))(CONNECT_DATA = (SID = host)))" . ';charset=UTF8', $db_user, $db_psw);
$stmt = $dbh->prepare('Select * from user.tbl_api_beeline where PASSPORT is NOT NULL and ROWNUM <= 10000');
$stmt->execute();
$rows = $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
$data = array_chunk($rows, 1000);
/*echo "<pre>";
var_dump($data);
<?php
/**
* Created by PhpStorm.
* User: Mkhusaynov
* Date: 10/26/2018
* Time: 10:56 AM
*/
namespace app\commands;
use yii\console\Controller;
<?php
/* @var $this yii\web\View */
/* @var $model app\controllers\SiteController */
/* @var $spend app\controllers\SiteController */
use app\components\Api;
use app\components\UsefulStuff;
$this->title = 'Главная страница';
$getSpending = $model['spend'];
$beeUsage = 0; $otherUsage = 0; $mbUsage = 0; $otherSms = 0;
if($getSpending['status'] == 200){
<?php
namespace App;
Class Download{
private function downloadFile($title, $link, $saveLink, $folderName, $i)
{
ob_start();
$nameOld = $link . $title . $i .'.mp4';
<?php
namespace App;
Class Download{
private function downloadFile($title, $link, $saveLink, $folderName, $i)
{
ob_start();
$nameOld = $link . $title . $i .'.mp4';